mirror of https://github.com/zulip/zulip.git
settings: Extract update_display_settings_backend.
This commit is contained in:
parent
c9db6b6658
commit
0299f41c80
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue