Updates for new book scanner

This commit is contained in:
advplyr 2023-09-02 17:49:28 -05:00
parent 4ad1cd2968
commit 2df95c1712
12 changed files with 508 additions and 192 deletions

View file

@ -83,6 +83,17 @@ class Author extends Model {
})
}
/**
* Get oldAuthor by id
* @param {string} authorId
* @returns {oldAuthor}
*/
static async getOldById(authorId) {
const author = await this.findByPk(authorId)
if (!author) return null
return author.getOldAuthor()
}
/**
* Check if author exists
* @param {string} authorId