Update Notification API Endpoint Paths for Consistency

- Modified the route for marking notifications as seen to ensure a consistent and clear API structure.
- Updated the notification client to reflect the new endpoint path for marking all notifications as seen, enhancing clarity for API consumers.
- These changes improve the overall usability and maintainability of the notification API.
This commit is contained in:
n.nakhostin
2025-09-23 13:35:00 +03:30
parent 648865f6a6
commit cdf15c9d49
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -218,7 +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", notificationHandler.PublicAllMarkSeen)
notificationsGP.GET("mark/:id", notificationHandler.PublicMarkSeen)
notificationsGP.GET("/mark", notificationHandler.PublicAllMarkSeen)
notificationsGP.GET("/mark/:id", notificationHandler.PublicMarkSeen)
}
}
+1 -1
View File
@@ -443,7 +443,7 @@ func (c *Client) AllMarkSeen(ctx context.Context, userID string) (*MarkSeenRespo
}
// Create HTTP request
url := fmt.Sprintf("%s/api/v1/notifications/all-seen/%s", c.config.BaseURL, userID)
url := fmt.Sprintf("%s/api/v1/notifications/seen-all/%s", c.config.BaseURL, userID)
httpReq, err := http.NewRequestWithContext(ctx, "PUT", url, nil)
if err != nil {
return nil, fmt.Errorf("failed to create HTTP request: %w", err)