mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-17 00:07:24 +00:00
25 lines
468 B
Ruby
25 lines
468 B
Ruby
module OpenFoodWeb
|
|
class CartController < ApplicationController
|
|
respond_to :json
|
|
|
|
# before_filter :authorize_read!, :except => [:index, :search, :create]
|
|
|
|
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
|
|
end |