Add Notification Filters for Seen and Priority

- Introduced new optional fields in the SearchForm for filtering notifications by 'seen' status and 'priority', enhancing the flexibility of notification retrieval.
- Updated the GetNotifications method in the notification service to accommodate the new filters, ensuring they are included in the query parameters.
- Enhanced the notification client to support the new filters in API requests, improving the overall functionality of the notification system.
- Updated API documentation with Swagger comments to reflect the new query parameters, ensuring clarity for API consumers.
This commit is contained in:
n.nakhostin
2025-09-22 09:57:14 +03:30
parent 928fab6b4a
commit aef91b4711
7 changed files with 66 additions and 4 deletions
+4
View File
@@ -165,6 +165,8 @@ func (s *notificationService) GetNotifications(ctx context.Context, req *SearchF
"event_type": req.EventType,
"type": req.Type,
"recipient": req.Recipient,
"seen": req.Seen,
"priority": req.Priority,
"limit": pagination.Limit,
"offset": pagination.Offset,
})
@@ -175,6 +177,8 @@ func (s *notificationService) GetNotifications(ctx context.Context, req *SearchF
EventType: req.EventType,
Type: req.Type,
UserID: req.Recipient,
Seen: req.Seen,
Priority: req.Priority,
PerPage: pagination.Limit,
Page: pagination.Offset / pagination.Limit,
})