mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-07-12 00:12:23 +00:00
remove fcm token
This commit is contained in:
@ -15,3 +15,13 @@ def register_fcm_token(user_id, registration_id, device_id, device_type):
|
||||
'registration_id': registration_id})
|
||||
return device
|
||||
|
||||
|
||||
def remove_fcm_token(user_id: int, access_token: str, registration_id) -> None:
|
||||
"""
|
||||
remove access_token and registration_token
|
||||
"""
|
||||
try:
|
||||
# remove fcm token for this device
|
||||
FCMDevice.objects.filter(user_id=user_id).delete()
|
||||
except Exception as e:
|
||||
print(e)
|
||||
|
Reference in New Issue
Block a user