Files
openfoodnetwork/app/controllers/api/customers_controller.rb
2018-06-22 15:39:46 +10:00

17 lines
369 B
Ruby

module Api
class CustomersController < Spree::Api::BaseController
respond_to :json
def update
@customer = Customer.find(params[:id])
authorize! :update, @customer
if @customer.update_attributes(params[:customer])
render text: @customer.id, :status => 200
else
invalid_resource!(@customer)
end
end
end
end