mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-07-15 18:07:02 +00:00
fixed add junior multiple device notification issue, changed send multiple user notification method, modified add fcm token method
This commit is contained in:
@ -52,9 +52,11 @@ class NotificationViewSet(viewsets.GenericViewSet):
|
||||
@action(methods=['get'], detail=False, url_path='test', url_name='test')
|
||||
def send_test_notification(self, request):
|
||||
"""
|
||||
to send test notification
|
||||
to test send notification, task expiry, top junior
|
||||
:return:
|
||||
"""
|
||||
notify_task_expiry()
|
||||
notify_top_junior()
|
||||
send_notification(TEST_NOTIFICATION, None, None, request.auth.payload['user_id'],
|
||||
{})
|
||||
return custom_response(SUCCESS_CODE["3000"])
|
||||
@ -67,12 +69,3 @@ class NotificationViewSet(viewsets.GenericViewSet):
|
||||
"""
|
||||
Notification.objects.filter(id__in=request.data.get('id')).update(is_read=True)
|
||||
return custom_response(SUCCESS_CODE['3039'], response_status=status.HTTP_200_OK)
|
||||
|
||||
@action(methods=['get'], url_path='task', url_name='task', detail=False,
|
||||
permission_classes=[AllowAny])
|
||||
def task(self, request, *args, **kwargs):
|
||||
"""
|
||||
notification list
|
||||
"""
|
||||
notify_top_junior()
|
||||
return custom_response(SUCCESS_CODE['3039'], response_status=status.HTTP_200_OK)
|
||||
|
Reference in New Issue
Block a user