Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update routes for declarative webhooks #141

Merged
merged 1 commit into from
Aug 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions web/config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@
Rails.application.routes.draw do
root to: "home#index"

mount ShopifyApp::Engine, at: "/api"
get "/api", to: redirect(path: "/") # Needed because our engine root is /api but that breaks frontend routing

# If you are adding routes outside of the /api path, remember to also add a proxy rule for
# them in web/frontend/vite.config.js

# Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html

scope path: :api, format: :json do
Expand All @@ -26,6 +20,12 @@
end
end

mount ShopifyApp::Engine, at: "/api"
get "/api", to: redirect(path: "/") # Needed because our engine root is /api but that breaks frontend routing

# If you are adding routes outside of the /api path, remember to also add a proxy rule for
# them in web/frontend/vite.config.js

# Any other routes will just render the react app
match "*path" => "home#index", via: [:get, :post]
end
Loading