Merge pull request 'filter notifications based on event type which should be PUSH' (#204) from notification_filter into main

Reviewed-on: https://repo.ravanertebat.com/TM/tm_app/pulls/204
This commit is contained in:
a.ghabeli
2025-10-06 09:48:22 +03:30
+5 -4
View File
@@ -2,24 +2,25 @@
class NotificationApi { class NotificationApi {
static const String notifications = '/api/v1/notifications'; static const String notifications = '/api/v1/notifications';
static String getNotifications({required int limit, required int offset}) { 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 markAllAsRead = '/api/v1/notifications/mark';
static const String markAsRead = '/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({ static String getUnreadNotifications({
required int limit, required int limit,
required int offset, 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({ static String getImportantNotifications({
required int limit, required int limit,
required int offset, 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';
} }
} }