update nginx/dep updates/fix eslint/change line endings

Signed-off-by: Zoey <zoey@z0ey.de>
This commit is contained in:
Zoey
2024-03-25 18:24:21 +01:00
parent ef5ac4cbd8
commit 906d7ce04a
96 changed files with 2579 additions and 2859 deletions

View File

@@ -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);
});