summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorHombreLaser <sebastian-440@live.com>2023-05-12 22:51:31 -0600
committerHombreLaser <sebastian-440@live.com>2023-05-12 22:51:31 -0600
commitab605e6d31f637e8b1cea15dd7fc929cd7e51919 (patch)
tree79980cf3a8c368bfeb9de672e91696111332a970 /app/controllers
parent027cfdfac140fd5f44dbf952b532b27538e559fe (diff)
Modificar respuesta de PUT a /account
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/api/user_accounts_controller.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/api/user_accounts_controller.rb b/app/controllers/api/user_accounts_controller.rb
index da18448..75e8b9a 100644
--- a/app/controllers/api/user_accounts_controller.rb
+++ b/app/controllers/api/user_accounts_controller.rb
@@ -23,7 +23,8 @@ module Api
def update
if current_user_account.update(permitted_params)
- render json: serialized_object.serializable_hash, status: :ok
+ @user_account = UserAccount.find_by(email: permitted_params[:email])
+ render json: generate_token, status: :ok
else
render json: { errors: current_user_account.errors.as_json }, status: :unprocessable_entity
end