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

@ -113,6 +113,8 @@ class AuthorController {
// Remove old author
await Database.removeAuthor(req.author.id)
SocketAuthority.emitter('author_removed', req.author.toJSON())
// Update filter data
Database.removeAuthorFromFilterData(req.author.libraryId, req.author.id)
// Send updated num books for merged author
const numBooks = await Database.models.libraryItem.getForAuthor(existingAuthor).length