diff options
author | HombreLaser <sebastian-440@live.com> | 2023-05-12 22:51:31 -0600 |
---|---|---|
committer | HombreLaser <sebastian-440@live.com> | 2023-05-12 22:51:31 -0600 |
commit | ab605e6d31f637e8b1cea15dd7fc929cd7e51919 (patch) | |
tree | 79980cf3a8c368bfeb9de672e91696111332a970 | |
parent | 027cfdfac140fd5f44dbf952b532b27538e559fe (diff) |
Modificar respuesta de PUT a /account
-rw-r--r-- | app/controllers/api/user_accounts_controller.rb | 3 |
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 |