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:
Luke Faraone 2013-03-21 11:26:28 -07:00
parent a59d5b9ce6
commit 825f59799a
1 changed files with 4 additions and 1 deletions

View File

@ -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