mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-12-26 19:34:19 +00:00
36 lines
927 B
JavaScript
36 lines
927 B
JavaScript
/*****************************************************************************
|
|
* Users *
|
|
* Fetch requests for /users routes *
|
|
*****************************************************************************/
|
|
Requests.users = {};
|
|
|
|
Requests.users.entity = {};
|
|
|
|
Requests.users.entity.delete = (userId) => {
|
|
let input = `/users/${userId}`;
|
|
let init = {
|
|
method: 'DELETE'
|
|
};
|
|
return Requests.JSONfetch(input, init);
|
|
};
|
|
|
|
Requests.users.entity.acceptTermsOfUse = () => {
|
|
let input = `/users/accept-terms-of-use`;
|
|
let init = {
|
|
method: 'POST'
|
|
};
|
|
return Requests.JSONfetch(input, init);
|
|
};
|
|
|
|
|
|
Requests.users.entity.avatar = {};
|
|
|
|
Requests.users.entity.avatar.delete = (userId) => {
|
|
let input = `/users/${userId}/avatar`;
|
|
let init = {
|
|
method: 'DELETE'
|
|
};
|
|
return Requests.JSONfetch(input, init);
|
|
}
|
|
|