add "Added By" for books
This commit is contained in:
@@ -5,10 +5,11 @@ import (
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
)
|
||||
|
||||
func (b bookPostCreate) toBook() model.Book {
|
||||
func (b bookPostCreate) toBook(user *model.User) model.Book {
|
||||
return model.Book{
|
||||
Title: b.Title,
|
||||
Author: b.Author,
|
||||
Title: b.Title,
|
||||
Author: b.Author,
|
||||
AddedBy: *user,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user