2023-04-06 06:42:21 +00:00
|
|
|
/*****************************************************************************
|
|
|
|
* Settings *
|
|
|
|
* Fetch requests for /users/<entity>/settings routes *
|
|
|
|
*****************************************************************************/
|
|
|
|
Requests.users.entity.settings = {};
|
|
|
|
|
|
|
|
Requests.users.entity.settings.profilePrivacy = {};
|
|
|
|
|
|
|
|
Requests.users.entity.settings.profilePrivacy.update = (userId, profilePrivacySetting, enabled) => {
|
|
|
|
let input = `/users/${userId}/settings/profile-privacy/${profilePrivacySetting}`;
|
|
|
|
let init = {
|
|
|
|
method: 'PUT',
|
|
|
|
body: JSON.stringify(enabled)
|
|
|
|
};
|
|
|
|
return Requests.JSONfetch(input, init);
|
2023-04-13 14:08:07 +00:00
|
|
|
};
|
|
|
|
|