mirror of
https://github.com/zulip/zulip.git
synced 2025-11-10 08:56:10 +00:00
remove_push_device_token: Remove unused request argument.
This commit is contained in:
@@ -357,8 +357,8 @@ def add_push_device_token(user_profile, token_str, kind, ios_app_id=None):
|
||||
token.last_updated = timezone.now()
|
||||
token.save(update_fields=['last_updated'])
|
||||
|
||||
def remove_push_device_token(request, user_profile, token_str, kind):
|
||||
# type: (HttpRequest, UserProfile, str, int) -> None
|
||||
def remove_push_device_token(user_profile, token_str, kind):
|
||||
# type: (UserProfile, str, int) -> None
|
||||
try:
|
||||
token = PushDeviceToken.objects.get(token=token_str, kind=kind)
|
||||
token.delete()
|
||||
|
||||
@@ -37,12 +37,12 @@ def add_android_reg_id(request, user_profile, token=REQ()):
|
||||
def remove_apns_device_token(request, user_profile, token=REQ()):
|
||||
# type: (HttpRequest, UserProfile, str) -> HttpResponse
|
||||
validate_token(token)
|
||||
remove_push_device_token(request, user_profile, token, PushDeviceToken.APNS)
|
||||
remove_push_device_token(user_profile, token, PushDeviceToken.APNS)
|
||||
return json_success()
|
||||
|
||||
@has_request_variables
|
||||
def remove_android_reg_id(request, user_profile, token=REQ()):
|
||||
# type: (HttpRequest, UserProfile, str) -> HttpResponse
|
||||
validate_token(token)
|
||||
remove_push_device_token(request, user_profile, token, PushDeviceToken.GCM)
|
||||
remove_push_device_token(user_profile, token, PushDeviceToken.GCM)
|
||||
return json_success()
|
||||
|
||||
Reference in New Issue
Block a user