2023-03-30 11:36:11 +00:00
|
|
|
/*****************************************************************************
|
|
|
|
* Users *
|
|
|
|
* Fetch requests for /users routes *
|
|
|
|
*****************************************************************************/
|
|
|
|
Requests.users = {};
|
|
|
|
|
|
|
|
Requests.users.entity = {};
|
|
|
|
|
2023-04-03 13:25:55 +00:00
|
|
|
Requests.users.entity.delete = (userId) => {
|
2023-03-30 11:36:11 +00:00
|
|
|
let input = `/users/${userId}`;
|
|
|
|
let init = {
|
|
|
|
method: 'DELETE'
|
|
|
|
};
|
|
|
|
return Requests.JSONfetch(input, init);
|
|
|
|
};
|
2023-04-03 13:25:55 +00:00
|
|
|
|
2023-04-06 06:42:21 +00:00
|
|
|
Requests.users.entity.avatar = {};
|
2023-04-03 13:25:55 +00:00
|
|
|
|
2023-04-06 06:42:21 +00:00
|
|
|
Requests.users.entity.avatar.delete = (userId) => {
|
|
|
|
let input = `/users/${userId}/avatar`;
|
2023-04-03 13:25:55 +00:00
|
|
|
let init = {
|
|
|
|
method: 'DELETE'
|
|
|
|
};
|
|
|
|
return Requests.JSONfetch(input, init);
|
|
|
|
}
|