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:
(async) byId(id) → {Promise:.<object:>}
Get an author by id.
Parameters:
| Name | Type | Description |
|---|---|---|
id |
number |
- Source:
Returns:
(async) byName(name) → {Promise:.<object:>}
Get an author by name.
Parameters:
| Name | Type | Description |
|---|---|---|
name |
string |
- Source:
Returns:
(async) insert(name, personalName) → {Promise:.<object:>}
Insert an author.
Parameters:
| Name | Type | Description |
|---|---|---|
name |
string | |
personalName |
string |
- Source:
Returns:
(async) linkAuthorBook(authorId, bookId) → {Promise:.<void:>}
Link an author to a book.
Parameters:
| Name | Type | Description |
|---|---|---|
authorId |
number | |
bookId |
number |
- Source: