Added markAll as read for notification

This commit is contained in:
llsajjad
2025-09-23 15:01:42 +03:30
parent c0b6121db6
commit 70066c26e8
7 changed files with 101 additions and 71 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ class NotificationApi {
static const String markAllAsRead = '/api/v1/notifications';
static const String markAllAsRead = '/api/v1/notifications/mark';
static const String markAsRead = '/api/v1/notifications/mark-as-read';
static const String tenderApprovalsTender = '/api/v1/notifications';
static String getTenderApprovalById({required String tenderId}) {
+9 -8
View File
@@ -24,14 +24,15 @@ class NotificationsService {
return result;
}
Future<Result<NotificationResponseModel>> markAllAsRead() async {
final result = await _networkManager.makeRequest(
NotificationApi.markAllAsRead,
method: 'POST',
(json) => NotificationResponseModel.fromJson(json),
);
return result;
}
Future<Result<Map<String, dynamic>>> markAllAsRead() async {
final result = await _networkManager.makeRequest(
NotificationApi.markAllAsRead,
method: 'GET',
(json) => json,
);
return result;
}
Future<Result<NotificationResponseModel>> markAsRead({
required String notificationId,