summaryrefslogtreecommitdiffhomepage
path: root/rails-backend/config/routes.rb
diff options
context:
space:
mode:
authorrealtradam <[email protected]>2024-06-27 12:41:26 -0400
committerrealtradam <[email protected]>2024-06-27 12:41:26 -0400
commitc8be5658bae95b94198dc00bd206ba324d9404e0 (patch)
tree24563828d9f04a4e52c9187cff3c028434fd886c /rails-backend/config/routes.rb
parent8ec0664fe7cf4a34bc5fc1f162c053622a42dd41 (diff)
downloadgameHolster-c8be5658bae95b94198dc00bd206ba324d9404e0.tar.gz
gameHolster-c8be5658bae95b94198dc00bd206ba324d9404e0.zip
add frontend to repo
Diffstat (limited to 'rails-backend/config/routes.rb')
-rw-r--r--rails-backend/config/routes.rb46
1 files changed, 46 insertions, 0 deletions
diff --git a/rails-backend/config/routes.rb b/rails-backend/config/routes.rb
new file mode 100644
index 0000000..ba4c647
--- /dev/null
+++ b/rails-backend/config/routes.rb
@@ -0,0 +1,46 @@
+Rails.application.routes.draw do
+ get 'tags/index'
+ get 'tags/create'
+ get 'tags/destroy'
+ #
+ # isolated domain, do not allow auth here
+ #constraints host: 'localhost' do
+ # GAMES
+ get 'game/:user/:game/*path/:file', to: 'api/v1/games#show_file', constraints: { file: /[^\/]+/ }
+ get 'game/:user/:game/:file', to: 'api/v1/games#show_file', constraints: { file: /[^\/]+/ }
+ #end
+
+ namespace :api do
+ namespace :v1 do
+
+ #constraints host: "localhost" do
+ # USERS
+ get 'users/index', to: 'users#index'
+
+ # GAMES
+ post 'games', to: 'games#create'
+ get 'games', to: 'games#index'
+ get 'games/:user/', to: 'games#show'
+ get 'games/:user/:game', to: 'games#show'
+ get 'games_img/:user/:game', to: 'games#show_img'
+ #resources :games
+
+ # TAGS
+ get 'tags', to: 'tags#index'
+
+ # AUTH
+ get 'auth/callback', to: 'auth#callback'
+ get 'auth/data', to: 'auth#data'
+ #end
+
+ end
+ end
+ # Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html
+
+ # Reveal health status on /up that returns 200 if the app boots with no exceptions, otherwise 500.
+ # Can be used by load balancers and uptime monitors to verify that the app is live.
+ get "up" => "rails/health#show", as: :rails_health_check
+
+ # Defines the root path route ("/")
+ # root "posts#index"
+end