move most of the logic of IOSocketController into a dedicated class
This commit is contained in:
parent
1abae077a3
commit
e6bd655527
7 changed files with 713 additions and 735 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue