From e4d53e0d0ae8ff4b79a2ed8b24a34e6f5258ee8d Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Mon, 26 Jan 2026 13:49:37 -0500 Subject: [PATCH] feat: Update backend validation for 10-point rating scale - Change rating validation from 1-5 to 1-10 - Enable half-star precision support in backend - Maintain compatibility with frontend conversion logic - Support odd numbers for half-star ratings (1,3,5,7,9) --- internal/handlers/ebook.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/handlers/ebook.go b/internal/handlers/ebook.go index 9877575..8c729d4 100644 --- a/internal/handlers/ebook.go +++ b/internal/handlers/ebook.go @@ -322,7 +322,7 @@ func (h *Handler) UpdateReadingProgress(c echo.Context) error { // CreateOrUpdateEbookRatingRequest represents the request for creating/updating an ebook rating type CreateOrUpdateEbookRatingRequest struct { - Rating int32 `json:"rating" validate:"required,min=1,max=5"` + Rating int32 `json:"rating" validate:"required,min=1,max=10"` } // GetEbookRating handles GET /api/ebooks/:id/rating