2023-03-29 12:32:35 +00:00
|
|
|
/*****************************************************************************
|
2023-10-04 10:32:27 +00:00
|
|
|
* Requests for /admin routes *
|
2023-03-29 12:32:35 +00:00
|
|
|
*****************************************************************************/
|
2023-11-09 13:29:01 +00:00
|
|
|
nopaque.requests.admin = {};
|
2023-03-29 12:32:35 +00:00
|
|
|
|
2023-11-09 13:29:01 +00:00
|
|
|
nopaque.requests.admin.users = {};
|
2023-03-29 12:32:35 +00:00
|
|
|
|
2023-11-09 13:29:01 +00:00
|
|
|
nopaque.requests.admin.users.entity = {};
|
2023-03-29 12:32:35 +00:00
|
|
|
|
2023-11-09 13:29:01 +00:00
|
|
|
nopaque.requests.admin.users.entity.confirmed = {};
|
2023-03-29 12:32:35 +00:00
|
|
|
|
2023-11-09 13:29:01 +00:00
|
|
|
nopaque.requests.admin.users.entity.confirmed.update = (userId, value) => {
|
2023-03-29 12:32:35 +00:00
|
|
|
let input = `/admin/users/${userId}/confirmed`;
|
|
|
|
let init = {
|
|
|
|
method: 'PUT',
|
|
|
|
body: JSON.stringify(value)
|
|
|
|
};
|
2023-11-09 13:29:01 +00:00
|
|
|
return nopaque.requests.JSONfetch(input, init);
|
2023-03-29 12:32:35 +00:00
|
|
|
};
|