mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-06 05:08:13 +02:00
refactor: remove /users/{uid}/settings/{setting} route
@baris Also, I am now allowing the following properties to be saved in User.saveSettings: - categoryTopicSort - topicPostSort - setCategorySort - setTopicSort
This commit is contained in:
@@ -20,9 +20,9 @@ define('sort', ['components', 'api'], function (components, api) {
|
||||
}
|
||||
var newSetting = $(this).attr('data-sort');
|
||||
if (app.user.uid) {
|
||||
api.put(`/users/${app.user.uid}/settings/${field}`, {
|
||||
value: newSetting,
|
||||
}).then(() => {
|
||||
const payload = { settings: {} };
|
||||
payload.settings[field] = newSetting;
|
||||
api.put(`/users/${app.user.uid}/settings`, payload).then(() => {
|
||||
refresh(newSetting, utils.params());
|
||||
});
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user