-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
95b6e12
commit 3ee53ec
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
app/controllers/spree/api/v2/storefront/vendor_photos_controller.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
module Spree | ||
module Api | ||
module V2 | ||
module Storefront | ||
class VendorPhotosController < Spree::Api::V2::ResourceController | ||
def collection | ||
vendor.photos | ||
end | ||
|
||
private | ||
|
||
def vendor | ||
@vendor ||= Spree::Vendor.find(params[:vendor_id]) | ||
end | ||
|
||
def collection_serializer | ||
SpreeCmCommissioner::V2::Storefront::AssetSerializer | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters