mirror of
https://gitlab.com/comunic/comunicconsole
synced 2025-11-05 04:34:03 +00:00
Display the list of registered keys
This commit is contained in:
@@ -33,6 +33,12 @@ export interface NewAdminGeneralSettings {
|
||||
email: string;
|
||||
}
|
||||
|
||||
export interface AdminAccountKey {
|
||||
id: number;
|
||||
name: string;
|
||||
time_add: number;
|
||||
}
|
||||
|
||||
const SESSION_STORAGE_TOKEN = "auth_token";
|
||||
|
||||
let currentAccount: AdminAccount | null = null;
|
||||
@@ -248,4 +254,15 @@ export class AccountHelper {
|
||||
|
||||
sessionStorage.setItem(SESSION_STORAGE_TOKEN, res.token);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the list of keys of an admin
|
||||
*
|
||||
* @param adminID The id of the target administrator
|
||||
*/
|
||||
static async GetAdminKeys(adminID: number): Promise<AdminAccountKey[]> {
|
||||
return await serverRequest("accounts/keys", {
|
||||
id: adminID,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user