refs #6264 perf remove unnecessary code
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Javier Segarra 2023-12-05 13:05:26 +01:00
parent a8b0a7a5b3
commit a5fb07bf12
1 changed files with 1 additions and 10 deletions

View File

@ -1,16 +1,7 @@
const {models} = require('vn-loopback/server/server');
module.exports = function(options) {
return async function(req, res, next) {
if (!req.accessToken) {
const token = req.headers.authorization;
if (!token) return next();
const accessToken = await models.AccessToken.findById(token);
if (!accessToken) return next();
if (!req.accessToken)
return next();
}
let LoopBackContext = require('loopback-context');
let loopbackContext = LoopBackContext.getCurrentContext();