mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-08-04 08:23:37 +00:00
update nginx/dep updates/fix eslint/change line endings
Signed-off-by: Zoey <zoey@z0ey.de>
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
const express = require('express');
|
||||
const jwtdecode = require('../../lib/express/jwt-decode');
|
||||
const express = require('express');
|
||||
const jwtdecode = require('../../lib/express/jwt-decode');
|
||||
const internalToken = require('../../internal/token');
|
||||
const apiValidator = require('../../lib/validator/api');
|
||||
const apiValidator = require('../../lib/validator/api');
|
||||
|
||||
let router = express.Router({
|
||||
const router = express.Router({
|
||||
caseSensitive: true,
|
||||
strict: true,
|
||||
mergeParams: true
|
||||
strict: true,
|
||||
mergeParams: true,
|
||||
});
|
||||
|
||||
router
|
||||
@@ -23,13 +23,13 @@ router
|
||||
* for services like Job board and Worker.
|
||||
*/
|
||||
.get(jwtdecode(), (req, res, next) => {
|
||||
internalToken.getFreshToken(res.locals.access, {
|
||||
expiry: (typeof req.query.expiry !== 'undefined' ? req.query.expiry : null),
|
||||
scope: (typeof req.query.scope !== 'undefined' ? req.query.scope : null)
|
||||
})
|
||||
internalToken
|
||||
.getFreshToken(res.locals.access, {
|
||||
expiry: typeof req.query.expiry !== 'undefined' ? req.query.expiry : null,
|
||||
scope: typeof req.query.scope !== 'undefined' ? req.query.scope : null,
|
||||
})
|
||||
.then((data) => {
|
||||
res.status(200)
|
||||
.send(data);
|
||||
res.status(200).send(data);
|
||||
})
|
||||
.catch(next);
|
||||
})
|
||||
@@ -40,13 +40,12 @@ router
|
||||
* Create a new Token
|
||||
*/
|
||||
.post((req, res, next) => {
|
||||
apiValidator({$ref: 'endpoints/tokens#/links/0/schema'}, req.body)
|
||||
apiValidator({ $ref: 'endpoints/tokens#/links/0/schema' }, req.body)
|
||||
.then((payload) => {
|
||||
return internalToken.getTokenFromEmail(payload);
|
||||
})
|
||||
.then((data) => {
|
||||
res.status(200)
|
||||
.send(data);
|
||||
res.status(200).send(data);
|
||||
})
|
||||
.catch(next);
|
||||
});
|
||||
|
Reference in New Issue
Block a user