Update documentation to reflect interactive rating system and API changes
- Update README.md with interactive rating system details - Document zero-rating behavior in GET /api/ebooks/:id/rating - Add comprehensive rating system documentation section - Update Bruno collection files to reflect new API behavior - Enhance API testing documentation with rating 0 fallback
This commit is contained in:
+3
-2
@@ -29,7 +29,7 @@ This directory contains Bruno collection for testing the Bookmann API with compr
|
||||
- **Update Reading Progress**: PUT /api/ebooks/:id/progress - Update progress
|
||||
|
||||
### Ratings (Protected - JWT Required)
|
||||
- **Get Ebook Rating**: GET /api/ebooks/:id/rating - User's rating for ebook
|
||||
- **Get Ebook Rating**: GET /api/ebooks/:id/rating - User's rating for ebook (returns 0 if unrated)
|
||||
- **Create/Update Rating**: POST /api/ebooks/:id/rating - Rate ebook (1-5 stars)
|
||||
- **Delete Rating**: DELETE /api/ebooks/:id/rating - Remove user's rating
|
||||
- **Get All Ratings**: GET /api/ebooks/:id/ratings - All ratings for ebook
|
||||
@@ -47,7 +47,8 @@ Each request includes:
|
||||
|
||||
- **Authentication Flow**: Register → Login → Use Bearer token for all other requests
|
||||
- **JWT Tokens**: Valid for 24 hours, include in `Authorization: Bearer <token>` header
|
||||
- **User Isolation**: Progress and data are user-specific
|
||||
- **User Isolation**: Progress, ratings, and data are user-specific
|
||||
- **Rating Behavior**: Get rating returns 0 when no rating exists (instead of 404)
|
||||
- **Variables**: Update `ebook_id` for testing specific ebooks
|
||||
- **Security**: Passwords hashed with bcrypt, unique email/username constraints
|
||||
- **JSON**: All requests/responses use JSON format
|
||||
Reference in New Issue
Block a user