add update settings method, remove all env var references possible
This commit is contained in:
1 parent
992bf099fa
commit
11b97ab3b4
17 files changed
+149
-36
No files matched your search
@@ -27,7 +27,8 @@ const isAllowed = (allowedRoles) => {
|
||||
// Parse the token
|
||||
try {
|
||||
const parsedToken = token.slice(TOKEN_PREFIX.length, token.length);
|
||||
var decoded = jwt.verify(parsedToken, process.env.JWT_SECRET);
|
||||
const { jwtSecret } = req.settingsService.getSettings();
|
||||
var decoded = jwt.verify(parsedToken, jwtSecret);
|
||||
const userRoles = decoded.role;
|
||||
|
||||
// Check if the user has the required role
|
||||
|
||||
Reference in new issue
Block a user