parent
d2ee52ce43
commit
8c9e9522db
10 changed files with 26 additions and 68 deletions
|
@ -14,11 +14,6 @@ export interface AdminApiData {
|
|||
textures: CharacterTexture[]
|
||||
}
|
||||
|
||||
export interface AdminBannedData {
|
||||
is_banned: boolean,
|
||||
message: string
|
||||
}
|
||||
|
||||
export interface CharacterTexture {
|
||||
id: number,
|
||||
level: number,
|
||||
|
@ -115,18 +110,6 @@ class AdminApi {
|
|||
headers: {"Authorization": `${ADMIN_API_TOKEN}`}
|
||||
});
|
||||
}
|
||||
|
||||
async verifyBanUser(organizationMemberToken: string, ipAddress: string, room: string): Promise<AdminBannedData> {
|
||||
if (!ADMIN_API_URL) {
|
||||
return Promise.reject('No admin backoffice set!');
|
||||
}
|
||||
//todo: this call can fail if the corresponding world is not activated or if the token is invalid. Handle that case.
|
||||
return Axios.get(ADMIN_API_URL + '/api/check-moderate-user/' + ipAddress + '/' + organizationMemberToken + '/room/' + room,
|
||||
{headers: {"Authorization": `${ADMIN_API_TOKEN}`}}
|
||||
).then((data) => {
|
||||
return data.data;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export const adminApi = new AdminApi();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue