refactor: server: auth: destructure

This commit is contained in:
coderiaser 2024-11-22 12:17:10 +02:00
parent dff0267239
commit da0e99ad8c
2 changed files with 5 additions and 4 deletions

View file

@ -16,8 +16,9 @@ module.exports = (config) => {
function _middle(config, authentication, req, res, next) {
const is = config('auth');
const {originalUrl} = req;
if (!is || req.originalUrl.startsWith("/public/"))
if (!is || originalUrl.startsWith('/public/'))
return next();
const success = () => next();