Add link to author in bookform

This commit is contained in:
2026-02-03 18:59:48 +01:00
parent 160d7e304f
commit 453beec605
4 changed files with 13 additions and 3 deletions

View File

@@ -10,7 +10,7 @@ import (
func FetchBookGet(db *gorm.DB, userId uint, bookId uint64) (dto.BookGet, error) {
var book dto.BookGet
query := db.Model(&model.Book{})
selectQueryString := "books.title, authors.name as author, books.isbn, books.inventaire_id, books.open_library_id, books.summary, " +
selectQueryString := "books.title, authors.name as author, authors.id as author_id, books.isbn, books.inventaire_id, books.open_library_id, books.summary, " +
"user_books.rating, user_books.read, user_books.want_read, " +
"DATE(user_books.start_read_date) as start_read_date, " +
"DATE(user_books.end_read_date) AS end_read_date, " +