Fix:Changing author name not updating library item metadata files #3060

This commit is contained in:
advplyr 2024-06-27 16:32:38 -05:00
parent 8cadaa57f6
commit 56c0124c13
3 changed files with 106 additions and 13 deletions

View file

@ -23,6 +23,20 @@ class BookAuthor extends Model {
})
}
/**
* Get number of books for author
*
* @param {string} authorId
* @returns {Promise<number>}
*/
static getCountForAuthor(authorId) {
return this.count({
where: {
authorId
}
})
}
/**
* Initialize model
* @param {import('../Database').sequelize} sequelize