Class: Stay::Api::V1::UsersController

Inherits:
BaseApiController
  • Object
show all
Defined in:
app/controllers/stay/api/v1/users_controller.rb

Instance Method Summary collapse

Instance Method Details

#destroyObject



4
5
6
7
8
9
10
# File 'app/controllers/stay/api/v1/users_controller.rb', line 4

def destroy
  if @user.destroy
    render json: { message: 'User successfully deleted' }, status: :ok
  else
    render json: { error: 'Failed to delete user' }, status: :unprocessable_entity
  end
end