package models

func AddBook(book Book) (newBook Book, err error){
	_, err = x.Insert(&book)

	if err != nil {
		return Book{}, err
	}

	// Get the newly inserted book
	newBook, _, err = GetBookById(book.ID)

	return book, err
}