parent
fb399ac973
commit
8b996803c8
5 changed files with 30 additions and 5 deletions
|
@ -49,11 +49,12 @@ func logoutHandler(h handler) {
|
|||
}
|
||||
|
||||
type bookData struct {
|
||||
S Status
|
||||
Book database.Book
|
||||
Description []string
|
||||
Lists []database.BookList
|
||||
UserLists []string
|
||||
S Status
|
||||
Book database.Book
|
||||
Description []string
|
||||
DownloadCounter int
|
||||
Lists []database.BookList
|
||||
UserLists []string
|
||||
}
|
||||
|
||||
func bookHandler(h handler) {
|
||||
|
@ -73,6 +74,11 @@ func bookHandler(h handler) {
|
|||
}
|
||||
data.S.Title = book.Title + author + " -- " + data.S.Title
|
||||
|
||||
data.DownloadCounter, err = h.db.GetDownloadCounter(id)
|
||||
if err != nil {
|
||||
log.Error("Error getting download counter: ", err)
|
||||
}
|
||||
|
||||
data.Lists, err = h.db.GetListsByBook(id)
|
||||
if err != nil {
|
||||
log.Error("Error getting lists: ", err)
|
||||
|
|
Reference in a new issue