mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-05 22:26:07 +00:00
Add ditributors and suppliers to OC show API
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
object @order_cycle
|
||||
|
||||
attributes :id, :name
|
||||
attributes :id, :name
|
||||
node( :suppliers ) do |oc|
|
||||
partial 'spree/api/enterprises/bulk_index', :object => oc.suppliers
|
||||
end
|
||||
node( :distributors ) do |oc|
|
||||
partial 'spree/api/enterprises/bulk_index', :object => oc.distributors
|
||||
end
|
||||
@@ -8,7 +8,7 @@ module Api
|
||||
|
||||
let!(:oc1) { FactoryGirl.create(:order_cycle) }
|
||||
let!(:oc2) { FactoryGirl.create(:order_cycle) }
|
||||
let(:attributes) { [:id, :name] }
|
||||
let(:attributes) { [:id, :name, :suppliers, :distributors] }
|
||||
|
||||
before do
|
||||
stub_authentication!
|
||||
|
||||
Reference in New Issue
Block a user