Update filterData for authors/series when added/removed

This commit is contained in:
advplyr 2023-08-18 14:40:36 -05:00
parent 7222171c5b
commit 9d7d4c6902
12 changed files with 152 additions and 13 deletions

View file

@ -83,6 +83,15 @@ class Author extends Model {
})
}
/**
* Check if author exists
* @param {string} authorId
* @returns {Promise<boolean>}
*/
static async checkExistsById(authorId) {
return (await this.count({ where: { id: authorId } })) > 0
}
/**
* Initialize model
* @param {import('../Database').sequelize} sequelize