diff --git a/cmd/web/router/routes.go b/cmd/web/router/routes.go index c5528db..2d276cf 100644 --- a/cmd/web/router/routes.go +++ b/cmd/web/router/routes.go @@ -218,6 +218,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) + notificationsGP.GET("mark", notificationHandler.PublicAllMarkSeen) + notificationsGP.GET("mark/:id", notificationHandler.PublicMarkSeen) } } diff --git a/internal/notification/handler.go b/internal/notification/handler.go index c8761c2..d2f2f78 100644 --- a/internal/notification/handler.go +++ b/internal/notification/handler.go @@ -277,7 +277,7 @@ func (h *NotificationHandler) CustomerNotifications(c echo.Context) error { // @Failure 400 {object} response.APIResponse // @Failure 500 {object} response.APIResponse // @Security BearerAuth -// @Router /api/v1/notifications/mark-seen/{id} [get] +// @Router /api/v1/notifications/mark/{id} [get] func (h *NotificationHandler) PublicMarkSeen(c echo.Context) error { notificationID := c.Param("id") @@ -306,7 +306,7 @@ func (h *NotificationHandler) PublicMarkSeen(c echo.Context) error { // @Failure 400 {object} response.APIResponse // @Failure 500 {object} response.APIResponse // @Security BearerAuth -// @Router /api/v1/notifications/all-seen/{user_id} [get] +// @Router /api/v1/notifications/mark [get] func (h *NotificationHandler) PublicAllMarkSeen(c echo.Context) error { userID, err := customer.GetCustomerIDFromContext(c) if err != nil {