Integrate users and books
- new table userbook linking users and book - moved rating to users book - updated demo data and tests - updated front to hide routes from non connected users
This commit is contained in:
@@ -9,6 +9,13 @@ func (b bookPostCreate) toBook() model.Book {
|
||||
return model.Book{
|
||||
Title: b.Title,
|
||||
Author: b.Author,
|
||||
}
|
||||
}
|
||||
|
||||
func fromUserBookDb(b *model.UserBook) bookUserGet {
|
||||
return bookUserGet{
|
||||
Title: b.Book.Title,
|
||||
Author: b.Book.Author,
|
||||
Rating: b.Rating,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user