From 517765114d0c32a9e1f3cd935806de69432cfd71 Mon Sep 17 00:00:00 2001 From: Arthur Lefebvre Date: Wed, 22 Oct 2025 14:34:08 +0200 Subject: [PATCH] feat: mark book as read --- front/src/BookCard.vue | 10 +++- front/src/BookListElement.vue | 52 +++++++++++++------ front/src/api.js | 4 +- front/src/locales/en.json | 5 ++ front/src/locales/fr.json | 5 ++ internal/model/userbook.go | 1 + ...{userbookpostcreate.go => bookpostread.go} | 33 +++++++++--- internal/routes/bookuserget.go | 2 + internal/setup/setup.go | 4 +- ...userbook_test.go => post_book_read_test.go | 12 ++--- 10 files changed, 94 insertions(+), 34 deletions(-) rename internal/routes/{userbookpostcreate.go => bookpostread.go} (52%) rename post_userbook_test.go => post_book_read_test.go (64%) diff --git a/front/src/BookCard.vue b/front/src/BookCard.vue index d5243b1..f527b17 100644 --- a/front/src/BookCard.vue +++ b/front/src/BookCard.vue @@ -4,7 +4,8 @@ title: String, author: String, imagePath: String, - rating: Number + rating: Number, + read: Boolean }); const imagePathOrDefault = (props.imagePath == "" || typeof props.imagePath === 'undefined') ? "defaultbook.png" : props.imagePath; @@ -24,6 +25,13 @@ const imagePathOrDefault = (props.imagePath == "" || typeof props.imagePath ===
{{author}}

{{rating}}/10

+ diff --git a/front/src/BookListElement.vue b/front/src/BookListElement.vue index f24581f..987d37f 100644 --- a/front/src/BookListElement.vue +++ b/front/src/BookListElement.vue @@ -1,6 +1,6 @@