* [FIX] Wrong behavior when returning controller's method result

* [MOD] Code refactoring
This commit is contained in:
nuxsmin
2018-08-22 20:22:50 +02:00
parent 3c78910569
commit b2687c58a6
40 changed files with 653 additions and 653 deletions

View File

@@ -104,13 +104,13 @@ final class UserPassResetController extends ControllerBase
$this->dic->get(MailService::class)->send(__('Cambio de Clave'), $email, UserPassRecoverService::getMailMessage($hash));
$this->returnJsonResponse(JsonResponse::JSON_SUCCESS, __u('Solicitud enviada'), [__u('En breve recibirá un correo para completar la solicitud.')]);
return $this->returnJsonResponse(JsonResponse::JSON_SUCCESS, __u('Solicitud enviada'), [__u('En breve recibirá un correo para completar la solicitud.')]);
} catch (\Exception $e) {
processException($e);
$this->addTracking();
$this->returnJsonResponseException($e);
return $this->returnJsonResponseException($e);
}
}
@@ -187,13 +187,13 @@ final class UserPassResetController extends ControllerBase
->addDetail(__u('Usuario'), $userId))
);
$this->returnJsonResponse(JsonResponse::JSON_SUCCESS, __u('Clave actualizada'));
return $this->returnJsonResponse(JsonResponse::JSON_SUCCESS, __u('Clave actualizada'));
} catch (\Exception $e) {
processException($e);
$this->addTracking();
$this->returnJsonResponseException($e);
return $this->returnJsonResponseException($e);
}
}