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)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user