mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-09 15:24:55 +02:00
Update:Express middleware sets req.user to new data model, openid permissions functions moved to new data model
This commit is contained in:
@ -5,7 +5,7 @@ class CacheController {
|
||||
|
||||
// POST: api/cache/purge
|
||||
async purgeCache(req, res) {
|
||||
if (!req.userNew.isAdminOrUp) {
|
||||
if (!req.user.isAdminOrUp) {
|
||||
return res.sendStatus(403)
|
||||
}
|
||||
await CacheManager.purgeAll()
|
||||
@ -14,7 +14,7 @@ class CacheController {
|
||||
|
||||
// POST: api/cache/items/purge
|
||||
async purgeItemsCache(req, res) {
|
||||
if (!req.userNew.isAdminOrUp) {
|
||||
if (!req.user.isAdminOrUp) {
|
||||
return res.sendStatus(403)
|
||||
}
|
||||
await CacheManager.purgeItems()
|
||||
|
Reference in New Issue
Block a user