-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
routes.rb
189 lines (159 loc) · 4.85 KB
/
routes.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
# frozen_string_literal: true
Spree::Core::Engine.routes.draw do
namespace :admin do
get '/search/users', to: "search#users", as: :search_users
get '/search/products', to: "search#products", as: :search_products
put '/locale/set', to: 'locale#set', defaults: { format: :json }, as: :set_locale
put '/theme/set', to: 'theme#set', defaults: { format: :json }, as: :set_theme
resources :dashboards, only: [] do
collection do
get :home
end
end
resources :promotions do
resources :promotion_rules
resources :promotion_actions
resources :promotion_codes, only: [:index, :new, :create]
resources :promotion_code_batches, only: [:index, :new, :create] do
get '/download', to: "promotion_code_batches#download", defaults: { format: "csv" }
end
end
resources :promotion_categories, except: [:show]
resources :zones
resources :tax_categories
resources :products do
resources :product_properties do
collection do
post :update_positions
end
end
resources :variant_property_rule_values, only: [:destroy] do
collection do
post :update_positions
end
end
resources :images do
collection do
post :update_positions
end
end
member do
post :clone
end
resources :variants, only: [:index, :edit, :update, :new, :create, :destroy] do
collection do
post :update_positions
end
end
resources :variants_including_master, only: [:update]
resources :prices, only: [:destroy, :index, :edit, :update, :new, :create]
end
get '/products/:product_slug/stock', to: "stock_items#index", as: :product_stock
resources :option_types do
collection do
post :update_positions
post :update_values_positions
end
end
delete '/option_values/:id', to: "option_values#destroy", as: :option_value
resources :properties
delete '/product_properties/:id', to: "product_properties#destroy", as: :product_property
resources :orders do
member do
get :cart
put :advance
get :confirm
put :complete
post :resend
put "/adjustments/unfinalize", to: "orders#unfinalize_adjustments"
put "/adjustments/finalize", to: "orders#finalize_adjustments"
put :approve
put :cancel
put :resume
end
resource :customer, controller: "orders/customer_details"
resources :customer_returns, only: [:index, :new, :edit, :create, :update] do
member do
put :refund
end
end
resources :adjustments, except: [:show]
resources :return_authorizations do
member do
put :fire
end
end
resources :payments, only: [:index, :new, :show, :create] do
member do
put :fire
end
resources :refunds, only: [:new, :create, :edit, :update]
end
resources :reimbursements, only: [:index, :create, :show, :edit, :update] do
member do
post :perform
end
end
resources :cancellations, only: [:index] do
collection do
post :short_ship
end
end
end
resource :general_settings, only: :edit
resources :stores, only: [:index, :new, :create, :edit, :update]
resources :return_items, only: [:update]
resources :taxonomies do
collection do
post :update_positions
end
resources :taxons do
resource :attachment, controller: 'taxons/attachment', only: [:destroy]
end
end
resources :taxons, only: [:index, :show] do
collection do
get :search
end
end
resources :reimbursement_types, only: [:index]
resources :adjustment_reasons, except: [:show, :destroy]
resources :refund_reasons, except: [:show, :destroy]
resources :return_reasons, except: [:show, :destroy]
resources :store_credit_reasons, except: [:show]
resources :shipping_methods
resources :shipping_categories
resources :stock_locations do
resources :stock_movements, only: [:index]
collection do
post :transfer_stock
post :update_positions
end
end
resources :stock_items, except: [:show, :new, :edit]
resources :tax_rates
resources :payment_methods do
collection do
post :update_positions
end
end
resources :users do
member do
get :orders
get :items
get :addresses
put :addresses
end
resources :store_credits, except: [:destroy] do
member do
get :edit_amount
put :update_amount
get :edit_validity
put :invalidate
end
end
end
resources :style_guide, only: [:index]
end
get '/admin', to: 'admin/root#index', as: :admin
end