Enhance Notification System with New API Endpoints and Response Structures
- Added new endpoints for marking notifications as seen and retrieving detailed notification information for both admin and user contexts, improving the flexibility of the notification system. - Implemented the MarkSeen and ViewNotification methods in the NotificationHandler, ensuring proper handling of notification visibility and details retrieval. - Updated the NotificationService interface to include methods for getting notification details and marking notifications as seen, enhancing service capabilities. - Enhanced the notification response structures to include additional fields such as Image, Seen, and ScheduledAt, providing richer data in API responses. - Updated API documentation with Swagger comments for the new endpoints and response formats, ensuring clarity for API consumers.
This commit is contained in:
@@ -109,6 +109,11 @@ func (s *Service) GetNotifications(ctx context.Context, req *GetNotificationsReq
|
||||
return s.client.GetNotifications(ctx, req)
|
||||
}
|
||||
|
||||
// GetNotification retrieves a single notification by ID
|
||||
func (s *Service) GetNotification(ctx context.Context, notificationID string) (*DetailedNotificationResponse, error) {
|
||||
return s.client.GetNotification(ctx, notificationID)
|
||||
}
|
||||
|
||||
// MarkSeen marks a notification as seen
|
||||
func (s *Service) MarkSeen(ctx context.Context, notificationID string) (*MarkSeenResponse, error) {
|
||||
return s.client.MarkSeen(ctx, notificationID)
|
||||
|
||||
Reference in New Issue
Block a user