mirror of
https://github.com/zulip/zulip.git
synced 2025-11-11 09:27:43 +00:00
Use @has_request_variables in json_remove_subscription.
(imported from commit b08b7672959f8773db1ff7e40b53648926b47a09)
This commit is contained in:
@@ -688,11 +688,9 @@ def json_list_subscriptions(request, user_profile):
|
||||
return json_success({"subscriptions": gather_subscriptions(user_profile)})
|
||||
|
||||
@authenticated_json_view
|
||||
def json_remove_subscription(request, user_profile):
|
||||
if 'subscription' not in request.POST:
|
||||
return json_error("Missing subscriptions")
|
||||
|
||||
sub_name = request.POST.get('subscription')
|
||||
@has_request_variables
|
||||
def json_remove_subscription(request, user_profile,
|
||||
sub_name=POST("subscription")):
|
||||
stream = get_stream(sub_name, user_profile.realm)
|
||||
if not stream:
|
||||
return json_error("Stream does not exist")
|
||||
|
||||
Reference in New Issue
Block a user