From a5b16a9522871779369408d25073689f434167a1 Mon Sep 17 00:00:00 2001 From: Artlef Date: Sun, 26 Oct 2025 16:35:11 +0100 Subject: [PATCH] Access route to single book form --- internal/routes/bookuserget.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/routes/bookuserget.go b/internal/routes/bookuserget.go index f555f50..e6ae623 100644 --- a/internal/routes/bookuserget.go +++ b/internal/routes/bookuserget.go @@ -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,