package models

func AddAuthor(author Author) (newAuthor Author, err error){
	_, err = x.Insert(&author)

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

	// Get the newly inserted author
	newAuthor, _, err = GetAuthorByID(author.ID)

	return newAuthor, err
}