Skip to content

Commit

Permalink
Refactor customer deletion logic
Browse files Browse the repository at this point in the history
  • Loading branch information
fabianoflorentino committed Mar 17, 2024
1 parent e1382e1 commit 8881e8c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/controllers/customers_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ def update
end

def destroy
customer.destroy!

CustomerUseCase::Delete.new(params[:id]).call
render json: { message: 'Customer deleted!' }, status: :ok
end

Expand Down

0 comments on commit 8881e8c

Please sign in to comment.