Skip to content

Commit

Permalink
refactor: server: auth: destructure
Browse files Browse the repository at this point in the history
  • Loading branch information
coderaiser committed Nov 22, 2024
1 parent dff0267 commit 897678e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 897678e

Please sign in to comment.