mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-06-23 01:09:26 +02:00
Add debug logs to playback sessions
This commit is contained in:
parent
17b930e13d
commit
337cf90c4b
2 changed files with 7 additions and 4 deletions
|
@ -89,8 +89,11 @@ class SessionController {
|
|||
}
|
||||
|
||||
async middleware(req, res, next) {
|
||||
var playbackSession = await this.db.getPlaybackSession(req.params.id)
|
||||
if (!playbackSession) return res.sendStatus(404)
|
||||
const playbackSession = await this.db.getPlaybackSession(req.params.id)
|
||||
if (!playbackSession) {
|
||||
Logger.error(`[SessionController] Unable to find playback session with id=${req.params.id}`)
|
||||
return res.sendStatus(404)
|
||||
}
|
||||
|
||||
if (req.method == 'DELETE' && !req.user.canDelete) {
|
||||
Logger.warn(`[SessionController] User attempted to delete without permission`, req.user)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue