Explorar o código

fix how to pass status to apiV3Err

Yohei-Shiina %!s(int64=3) %!d(string=hai) anos
pai
achega
b3b0daf8d9
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      packages/app/src/server/routes/login-passport.js

+ 2 - 2
packages/app/src/server/routes/login-passport.js

@@ -177,7 +177,7 @@ module.exports = function(crowi, app) {
   const loginWithLdap = async(req, res, next) => {
     if (!passportService.isLdapStrategySetup) {
       debug('LdapStrategy has not been set up');
-      return res.apiv3Err(ErrorV3('message.strategy_has_not_been_set_up', 405, null, { strategy: 'LdapStrategy' }));
+      return res.apiv3Err(ErrorV3('message.strategy_has_not_been_set_up', '', null, { strategy: 'LdapStrategy' }), 405);
     }
 
     if (!req.form.isValid) {
@@ -312,7 +312,7 @@ module.exports = function(crowi, app) {
   const loginWithLocal = (req, res, next) => {
     if (!passportService.isLocalStrategySetup) {
       debug('LocalStrategy has not been set up');
-      return res.apiv3Err(ErrorV3('message.strategy_has_not_been_set_up', 405, null, { strategy: 'LocalStrategy' }));
+      return res.apiv3Err(ErrorV3('message.strategy_has_not_been_set_up', '', null, { strategy: 'LocalStrategy' }), 405);
     }
 
     if (!req.form.isValid) {