Access route to single book form

This commit is contained in:
Artlef
2025-10-26 16:35:11 +01:00
parent fd790319a9
commit a5b16a9522

View File

@@ -9,6 +9,7 @@ import (
)
type bookUserGet struct {
BookID uint `json:"id"`
Title string `json:"title" binding:"required,max=300"`
Author string `json:"author" binding:"max=100"`
Rating int `json:"rating" binding:"min=0,max=10"`
@@ -32,6 +33,7 @@ func GetMyBooksHanderl(ac appcontext.AppContext) {
func userBookDbToWs(b *model.UserBook) bookUserGet {
return bookUserGet{
BookID: b.BookID,
Title: b.Book.Title,
Author: b.Book.Author,
Rating: b.Rating,