Explorar o código

improved error msg

kaori %!s(int64=4) %!d(string=hai) anos
pai
achega
6190046bd6
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/server/routes/apiv3/forgot-password.js

+ 1 - 1
src/server/routes/apiv3/forgot-password.js

@@ -54,7 +54,7 @@ module.exports = (crowi) => {
 
 
       // when the user is not found or active
       // when the user is not found or active
       if (user == null || user.status !== 2) {
       if (user == null || user.status !== 2) {
-        return;
+        return res.apiv3Err('user not found or active');
       }
       }
 
 
       const passwordResetOrderData = await PasswordResetOrder.createPasswordResetOrder(email);
       const passwordResetOrderData = await PasswordResetOrder.createPasswordResetOrder(email);