settings: Use '/settings' endpoint for changing display 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 display settings
instead of '/settings/display' endpoint.
This commit is contained in:
sahil839 2021-07-11 00:53:28 +05:30 committed by Tim Abbott
parent 256091dc15
commit bbee0fdf6f
3 changed files with 4 additions and 10 deletions

View File

@ -676,7 +676,7 @@ export function set_up() {
settings_ui.do_settings_change(
channel.patch,
"/json/settings/display",
"/json/settings",
data,
$(".timezone-setting-status").expectOne(),
);

View File

@ -35,13 +35,7 @@ function change_display_setting(data, status_element, success_msg_html, sticky)
$status_el.data("is_sticky", true);
$status_el.data("sticky_msg_html", success_msg_html);
}
settings_ui.do_settings_change(
channel.patch,
"/json/settings/display",
data,
status_element,
opts,
);
settings_ui.do_settings_change(channel.patch, "/json/settings", data, status_element, opts);
}
export function set_up() {
@ -153,7 +147,7 @@ export function set_up() {
loading.make_indicator(spinner, {text: settings_ui.strings.saving});
channel.patch({
url: "/json/settings/display",
url: "/json/settings",
data,
success() {},
error(xhr) {

View File

@ -510,7 +510,7 @@ export function register_stream_handlers() {
const data = {};
data.starred_message_counts = JSON.stringify(!starred_msg_counts);
channel.patch({
url: "/json/settings/display",
url: "/json/settings",
data,
});
});