Fix:Playlist API endpoint permissions

This commit is contained in:
advplyr 2022-11-28 16:29:04 -06:00
parent a2347150a2
commit d41366a417

View File

@ -187,14 +187,6 @@ class PlaylistController {
req.playlist = playlist
}
if (req.method == 'DELETE' && !req.user.canDelete) {
Logger.warn(`[PlaylistController] User attempted to delete without permission`, req.user.username)
return res.sendStatus(403)
} else if ((req.method == 'PATCH' || req.method == 'POST') && !req.user.canUpdate) {
Logger.warn('[PlaylistController] User attempted to update without permission', req.user.username)
return res.sendStatus(403)
}
next()
}
}