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:
@@ -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,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user