feat: mark book as read

This commit is contained in:
2025-10-22 14:34:08 +02:00
parent c4ca073b4a
commit 517765114d
10 changed files with 94 additions and 34 deletions

View File

@@ -12,6 +12,7 @@ type bookUserGet struct {
Title string `json:"title" binding:"required,max=300"`
Author string `json:"author" binding:"max=100"`
Rating int `json:"rating" binding:"min=0,max=10"`
Read bool `json:"read" binding:"boolean"`
}
func GetMyBooksHanderl(ac appcontext.AppContext) {
@@ -34,5 +35,6 @@ func userBookDbToWs(b *model.UserBook) bookUserGet {
Title: b.Book.Title,
Author: b.Book.Author,
Rating: b.Rating,
Read: b.Read,
}
}