Skip to content

Commit

Permalink
Close #1993 create an api to list event photos (#1995)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sreyleak-Deth authored Oct 8, 2024
1 parent 95b6e12 commit 3ee53ec
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
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
1 change: 1 addition & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,7 @@

resources :vendors do
resources :nearby_places, only: %i[index]
resources :vendor_photos
end
resource :homepage_data, only: [:show]
resources :homepage_sections, only: [:index]
Expand Down

0 comments on commit 3ee53ec

Please sign in to comment.