move most of the logic of IOSocketController into a dedicated class

This commit is contained in:
arp 2020-10-15 17:25:16 +02:00
parent 1abae077a3
commit e6bd655527
7 changed files with 713 additions and 735 deletions

View file

@ -11,11 +11,6 @@ export interface AdminApiData {
userUuid: string
}
export interface GrantedApiData {
granted: boolean,
memberTags: string[]
}
export interface fetchMemberDataByUuidResponse {
uuid: string;
tags: string[];
@ -66,6 +61,17 @@ class AdminApi {
)
return res.data;
}
reportPlayer(reportedUserUuid: string, reportedUserComment: string, reporterUserUuid: string) {
return Axios.post(`${ADMIN_API_URL}/api/report`, {
reportedUserUuid,
reportedUserComment,
reporterUserUuid,
},
{
headers: {"Authorization": `${ADMIN_API_TOKEN}`}
});
}
}
export const adminApi = new AdminApi();