nopaque/app/static/js/requests/admin.js

20 lines
649 B
JavaScript
Raw Permalink Normal View History

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
*****************************************************************************/
nopaque.requests.admin = {};
2023-03-29 12:32:35 +00:00
nopaque.requests.admin.users = {};
2023-03-29 12:32:35 +00:00
nopaque.requests.admin.users.entity = {};
2023-03-29 12:32:35 +00:00
nopaque.requests.admin.users.entity.confirmed = {};
2023-03-29 12:32:35 +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)
};
return nopaque.requests.JSONfetch(input, init);
2023-03-29 12:32:35 +00:00
};