mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-04-18 21:19:44 +00:00
Fix multiple bugs
This commit is contained in:
parent
ef3f39191d
commit
f511e0046d
5 changed files with 198 additions and 188 deletions
|
|
@ -27,13 +27,15 @@ class BookAuthor extends Model {
|
|||
* Get number of books for author
|
||||
*
|
||||
* @param {string} authorId
|
||||
* @param {import('sequelize').Transaction} [transaction]
|
||||
* @returns {Promise<number>}
|
||||
*/
|
||||
static getCountForAuthor(authorId) {
|
||||
static getCountForAuthor(authorId, transaction = null) {
|
||||
return this.count({
|
||||
where: {
|
||||
authorId
|
||||
}
|
||||
},
|
||||
transaction
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue