diff --git a/zerver/views/user_settings.py b/zerver/views/user_settings.py index b96c5f777d..203728b729 100644 --- a/zerver/views/user_settings.py +++ b/zerver/views/user_settings.py @@ -122,8 +122,11 @@ def json_left_side_userlist(request, user_profile, left_side_userlist=REQ(valida return json_success(result) +# TODO: Merge json_left_side_userlist and json_time_setting endpoints +# into this one; it should be straightforward @has_request_variables -def json_language_setting(request, user_profile, default_language=REQ(validator=check_string, default=None)): +def update_display_settings_backend(request, user_profile, + default_language=REQ(validator=check_string, default=None)): # type: (HttpRequest, UserProfile, Optional[str]) -> HttpResponse result = {} if (default_language is not None and diff --git a/zproject/urls.py b/zproject/urls.py index ac8104ef3f..4cabd0a750 100644 --- a/zproject/urls.py +++ b/zproject/urls.py @@ -247,7 +247,7 @@ v1_api_and_json_patterns = [ {'PUT': 'zerver.views.user_settings.set_avatar_backend', 'DELETE': 'zerver.views.user_settings.delete_avatar_backend'}), url(r'^settings/display$', rest_dispatch, - {'PATCH': 'zerver.views.user_settings.json_language_setting'}), + {'PATCH': 'zerver.views.user_settings.update_display_settings_backend'}), # users/me/alert_words -> zerver.views.alert_words url(r'^users/me/alert_words$', rest_dispatch,