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:
@@ -137,6 +137,8 @@ func RegisterAdminRoutes(e *echo.Echo, userHandler *user.Handler, companyHandler
|
||||
notificationsGP.Use(userHandler.AuthMiddleware())
|
||||
notificationsGP.POST("", notificationHandler.Send)
|
||||
notificationsGP.GET("", notificationHandler.GetNotifications)
|
||||
notificationsGP.GET("/view/:id", notificationHandler.ViewNotification)
|
||||
notificationsGP.GET("/mark-seen/:id", notificationHandler.MarkSeen)
|
||||
notificationsGP.GET("/my", notificationHandler.AdminNotifications)
|
||||
}
|
||||
}
|
||||
@@ -215,5 +217,7 @@ func RegisterPublicRoutes(e *echo.Echo, customerHandler *customer.Handler, tende
|
||||
{
|
||||
notificationsGP.Use(customerHandler.AuthMiddleware())
|
||||
notificationsGP.GET("", notificationHandler.CustomerNotifications)
|
||||
notificationsGP.GET("/view/:id", notificationHandler.PublicViewNotification)
|
||||
notificationsGP.GET("mark-seen/:id", notificationHandler.PublicMarkSeen)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user