mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-09-14 19:02:35 +00:00
Convert backend to ESM
- About 5 years overdue - Remove eslint, use bomejs instead
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
const Access = require('../access');
|
||||
import Access from "../access.js";
|
||||
|
||||
module.exports = () => {
|
||||
return function (req, res, next) {
|
||||
export default () => {
|
||||
return (_, res, next) => {
|
||||
res.locals.access = null;
|
||||
let access = new Access(res.locals.token || null);
|
||||
access.load()
|
||||
const access = new Access(res.locals.token || null);
|
||||
access
|
||||
.load()
|
||||
.then(() => {
|
||||
res.locals.access = access;
|
||||
next();
|
||||
@@ -12,4 +13,3 @@ module.exports = () => {
|
||||
.catch(next);
|
||||
};
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user