Files
openfoodnetwork/app/controllers/cart_controller.rb
2013-08-08 18:31:56 +10:00

22 lines
340 B
Ruby

class CartController < Spree::Api::BaseController
respond_to :json
def new
@cart = Cart.new(current_api_user)
if @cart.save
respond_with(@cart, :status => 201)
else
invalid_resource!(@cart)
end
end
def show
@cart = Cart.find(params[:id])
respond_with(@cart)
end
def add_product
end
end