mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-12 23:27:48 +00:00
17 lines
369 B
Ruby
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
|