Skip to content

Commit

Permalink
WIP #1979 create new api for organizer profile
Browse files Browse the repository at this point in the history
  • Loading branch information
Sreyleak-Deth committed Sep 27, 2024
1 parent 83503b7 commit c4b9a73
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ def self.prepended(base)
base.has_many :vendor_kind_option_values, serializer: :option_value
base.has_many :auto_apply_promotions, serializer: ::SpreeCmCommissioner::V2::Storefront::PromotionSerializer
base.has_many :active_promotions, serializer: ::SpreeCmCommissioner::V2::Storefront::PromotionSerializer
base.has_many :taxon

base.has_one :default_state, serializer: :state
base.has_one :logo, serializer: ::SpreeCmCommissioner::V2::Storefront::AssetSerializer
Expand Down
2 changes: 2 additions & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
end
end

resources :events

resources :vendor_photos do
collection do
post :update_positions
Expand Down
5 changes: 5 additions & 0 deletions db/migrate/20240926044328_add_vendor_to_spree_taxon.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class AddVendorToSpreeTaxon < ActiveRecord::Migration[7.0]
def change
add_reference :spree_taxons, :vendor, index: true, foreign_key: { to_table: :spree_vendors }, if_not_exists: true
end
end

0 comments on commit c4b9a73

Please sign in to comment.