Add library match all back updated to support v2 models

This commit is contained in:
advplyr
2022-04-20 18:05:09 -05:00
parent ff294867f8
commit 35f3b5863f
6 changed files with 60 additions and 45 deletions

View File

@ -546,12 +546,12 @@ class LibraryController {
res.json(Object.values(authors))
}
async matchBooks(req, res) {
async matchAll(req, res) {
if (!req.user.isRoot) {
Logger.error(`[LibraryController] Non-root user attempted to match library books`, req.user)
Logger.error(`[LibraryController] Non-root user attempted to match library items`, req.user)
return res.sendStatus(403)
}
this.scanner.matchLibraryBooks(req.library)
this.scanner.matchLibraryItems(req.library)
res.sendStatus(200)
}