mirror of https://github.com/zulip/zulip.git
Switch foo_list_subscriptions to the backend pattern.
This slightly reduces code duplication and in the future the {api,json}_ methods will hopefully go away, leaving only the _backend methods. (imported from commit 82a6e4a2ff2ba5d272068e9ff043ea47a1a8d278)
This commit is contained in:
parent
a59d5b9ce6
commit
825f59799a
|
@ -840,10 +840,13 @@ def get_public_streams_backend(request, user_profile):
|
|||
|
||||
@authenticated_api_view
|
||||
def api_list_subscriptions(request, user_profile):
|
||||
return json_success({"subscriptions": gather_subscriptions(user_profile)})
|
||||
return list_subscriptions_backend(request, user_profile)
|
||||
|
||||
@authenticated_json_post_view
|
||||
def json_list_subscriptions(request, user_profile):
|
||||
return list_subscriptions_backend(request, user_profile)
|
||||
|
||||
def list_subscriptions_backend(request, user_profile):
|
||||
return json_success({"subscriptions": gather_subscriptions(user_profile)})
|
||||
|
||||
@authenticated_api_view
|
||||
|
|
Loading…
Reference in New Issue