Explorar o código

add next function to argument of fallback

Yuki Takei %!s(int64=5) %!d(string=hai) anos
pai
achega
b2cf91ab11
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      src/server/middlewares/login-required.js

+ 2 - 2
src/server/middlewares/login-required.js

@@ -47,13 +47,13 @@ module.exports = (crowi, isGuestAllowed = false, fallback = null) => {
     const path = req.path || '';
     if (path.match(/^\/_api\/.+$/)) {
       if (fallback != null) {
-        return fallback(req, res);
+        return fallback(req, res, next);
       }
       return res.sendStatus(403);
     }
 
     if (fallback != null) {
-      return fallback(req, res);
+      return fallback(req, res, next);
     }
     req.session.redirectTo = req.originalUrl;
     return res.redirect('/login');