Created middleware to check if the user has a plex user linked to seasoned account. If not respond with 403 meaning you did have a authorization key, but this is forbidden; explaining in the response message that no plex account user id was found for this user and to please authenticate their plex account at authenticate endpoint.

This commit is contained in:
2019-11-04 23:04:33 +01:00
parent 977d05c6f2
commit 639f0ec17a
2 changed files with 32 additions and 0 deletions

View File

@@ -4,6 +4,7 @@ const bodyParser = require('body-parser');
const tokenToUser = require('./middleware/tokenToUser');
const mustBeAuthenticated = require('./middleware/mustBeAuthenticated');
const mustBeAdmin = require('./middleware/mustBeAdmin');
const mustHaveAccountLinkedToPlex = require('./middleware/mustHaveAccountLinkedToPlex');
const configuration = require('src/config/configuration').getInstance();
const listController = require('./controllers/list/listController');