Просмотр исходного кода

fix how to pass status to apiV3Err

Yohei-Shiina 3 лет назад
Родитель
Сommit
b3b0daf8d9
1 измененных файлов с 2 добавлено и 2 удалено
  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) => {
   const loginWithLdap = async(req, res, next) => {
     if (!passportService.isLdapStrategySetup) {
     if (!passportService.isLdapStrategySetup) {
       debug('LdapStrategy has not been set up');
       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) {
     if (!req.form.isValid) {
@@ -312,7 +312,7 @@ module.exports = function(crowi, app) {
   const loginWithLocal = (req, res, next) => {
   const loginWithLocal = (req, res, next) => {
     if (!passportService.isLocalStrategySetup) {
     if (!passportService.isLocalStrategySetup) {
       debug('LocalStrategy has not been set up');
       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) {
     if (!req.form.isValid) {