mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-06-24 17:59:06 +02:00
Update:API endpoints for library and library item scan updated to POST requests
This commit is contained in:
parent
c93f17051a
commit
b957e1a36b
6 changed files with 9 additions and 9 deletions
|
@ -203,7 +203,7 @@ class LibraryItemController {
|
|||
|
||||
if (global.XAccel) {
|
||||
Logger.debug(`Use X-Accel to serve static file ${libraryItem.media.coverPath}`)
|
||||
return res.status(204).header({'X-Accel-Redirect': global.XAccel + libraryItem.media.coverPath}).send()
|
||||
return res.status(204).header({ 'X-Accel-Redirect': global.XAccel + libraryItem.media.coverPath }).send()
|
||||
}
|
||||
return res.sendFile(libraryItem.media.coverPath)
|
||||
}
|
||||
|
@ -389,7 +389,7 @@ class LibraryItemController {
|
|||
else res.sendStatus(500)
|
||||
}
|
||||
|
||||
// GET: api/items/:id/scan (admin)
|
||||
// POST: api/items/:id/scan (admin)
|
||||
async scan(req, res) {
|
||||
if (!req.user.isAdminOrUp) {
|
||||
Logger.error(`[LibraryItemController] Non-admin user attempted to scan library item`, req.user)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue