Added markAll as read for notification
This commit is contained in:
@@ -18,7 +18,8 @@ class NotificationsRepository {
|
||||
);
|
||||
}
|
||||
|
||||
Future<Result<NotificationResponseModel>> markAllAsRead() async {
|
||||
return _notificationsService.markAllAsRead();
|
||||
}
|
||||
Future<Result<Map<String, dynamic>>> markAllAsRead() async {
|
||||
return _notificationsService.markAllAsRead();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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}) {
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user