summaryrefslogtreecommitdiff
path: root/app/controllers/api/sessions_controller.rb
diff options
context:
space:
mode:
authorHombreLaser <sebastian-440@live.com>2023-04-04 17:55:20 -0600
committerHombreLaser <sebastian-440@live.com>2023-04-04 17:55:20 -0600
commitdb9b4b712271a67e60e6c0bf58c9ce510f177682 (patch)
tree791da60f29a1ac3b73efff46493d96c0116318e0 /app/controllers/api/sessions_controller.rb
parent3afd35371caa0677fd2f66491bd337d1673013dc (diff)
Mejora presentaciĆ³n de mensajes de error
Diffstat (limited to 'app/controllers/api/sessions_controller.rb')
-rw-r--r--app/controllers/api/sessions_controller.rb2
1 files changed, 1 insertions, 1 deletions
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