From 06fc708e21d8645c6aa91cb52f88aa4ccf7f3a72 Mon Sep 17 00:00:00 2001 From: amirrezaghabeli Date: Mon, 6 Oct 2025 09:47:20 +0330 Subject: [PATCH] filter notifications based on event type which should be PUSH --- lib/data/services/api/notification_api.dart | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/data/services/api/notification_api.dart b/lib/data/services/api/notification_api.dart index b4403ea..353d5a3 100644 --- a/lib/data/services/api/notification_api.dart +++ b/lib/data/services/api/notification_api.dart @@ -2,24 +2,25 @@ class NotificationApi { static const String notifications = '/api/v1/notifications'; static String getNotifications({required int limit, required int offset}) { - return '$notifications?limit=$limit&offset=$offset'; + return '$notifications?limit=$limit&offset=$offset&event_type=PUSH'; } static const String markAllAsRead = '/api/v1/notifications/mark'; static const String markAsRead = '/api/v1/notifications/mark'; - static const String unreadNotifications = '/api/v1/notifications?seen=false'; + static const String unreadNotifications = + '/api/v1/notifications?seen=false?event_type=PUSH'; static String getUnreadNotifications({ required int limit, required int offset, }) { - return '/api/v1/notifications?seen=false&limit=$limit&offset=$offset'; + return '/api/v1/notifications?seen=false&limit=$limit&offset=$offset&event_type=PUSH'; } static String getImportantNotifications({ required int limit, required int offset, }) { - return '/api/v1/notifications?priority=important&limit=$limit&offset=$offset'; + return '/api/v1/notifications?priority=important&limit=$limit&offset=$offset&event_type=PUSH'; } }