Class: AuthorController

controllers~AuthorController()

Class representing a author controller.

Constructor

new AuthorController()

Create a author controller.
Source:

Methods

(async) byBook(bookId) → {Promise:.<Array:.<object:>>}

Get authors by book.
Parameters:
Name Type Description
bookId number
Source:
Returns:
Type
Promise:.<Array:.<object:>>

(async) byId(id) → {Promise:.<object:>}

Get an author by id.
Parameters:
Name Type Description
id number
Source:
Returns:
Type
Promise:.<object:>

(async) byName(name) → {Promise:.<object:>}

Get an author by name.
Parameters:
Name Type Description
name string
Source:
Returns:
Type
Promise:.<object:>

(async) insert(name, personalName) → {Promise:.<object:>}

Insert an author.
Parameters:
Name Type Description
name string
personalName string
Source:
Returns:
Type
Promise:.<object:>

(async) linkAuthorBook(authorId, bookId) → {Promise:.<void:>}

Link an author to a book.
Parameters:
Name Type Description
authorId number
bookId number
Source:
Returns:
Type
Promise:.<void:>