settings: Use '/settings' endpoint for changing notification settings.

We have merged the '/settings/display' and 'settings/notifications'
endpoints to '/settings' in backend. This commit updates the frontend
code to '/settings' endpoint for updating notification settings
instead of '/settings/notifications' endpoint.
This commit is contained in:
sahil839 2021-07-11 14:46:32 +05:30 committed by Tim Abbott
parent bbee0fdf6f
commit b5b7862571
2 changed files with 2 additions and 7 deletions

View File

@ -691,7 +691,7 @@ export function set_up() {
const data = {presence_enabled: $("#presence_enabled").prop("checked")};
settings_ui.do_settings_change(
channel.patch,
"/json/settings/notifications",
"/json/settings",
data,
$(".privacy-setting-status").expectOne(),
);

View File

@ -46,12 +46,7 @@ function rerender_ui() {
function change_notification_setting(setting, value, status_element) {
const data = {};
data[setting] = value;
settings_ui.do_settings_change(
channel.patch,
"/json/settings/notifications",
data,
status_element,
);
settings_ui.do_settings_change(channel.patch, "/json/settings", data, status_element);
}
function update_desktop_icon_count_display() {