New data model update for Match tab

This commit is contained in:
advplyr 2022-03-14 08:12:28 -05:00
parent 7d66f1eec9
commit 7348432594
3 changed files with 45 additions and 15 deletions

View file

@ -49,12 +49,15 @@ class LibraryItemController {
await this.db.updateLibraryItem(libraryItem)
this.emitter('item_updated', libraryItem.toJSONExpanded())
}
res.json(libraryItem)
res.json({
updated: hasUpdates,
libraryItem
})
}
// POST: api/items/:id/cover
async uploadCover(req, res) {
if (!req.user.canUpload || !req.user.canUpdate) {
if (!req.user.canUpload) {
Logger.warn('User attempted to upload a cover without permission', req.user)
return res.sendStatus(403)
}