From db9b4b712271a67e60e6c0bf58c9ce510f177682 Mon Sep 17 00:00:00 2001 From: HombreLaser Date: Tue, 4 Apr 2023 17:55:20 -0600 Subject: Mejora presentaciĆ³n de mensajes de error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/api/sessions_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers/api/sessions_controller.rb') diff --git a/app/controllers/api/sessions_controller.rb b/app/controllers/api/sessions_controller.rb index 3d9f315..a81af71 100644 --- a/app/controllers/api/sessions_controller.rb +++ b/app/controllers/api/sessions_controller.rb @@ -9,7 +9,7 @@ module Api @user_account = UserAccount.find_by(email: permitted_params[:email]) unless @user_account&.authenticate(permitted_params[:password]) - render json: { error_message: 'Credenciales incorrectas' }, status: :unauthorized and return + render json: { errors: { auth: 'Credenciales incorrectas' } }, status: :unauthorized and return end render json: generate_token, status: :ok -- cgit v1.2.3