View raw

1 Rails.application.routes.draw do 2 root to: "home#index" 3 4 resource :session 5 resource :registration, only: [ "new", "create" ] 6 resources :passwords, param: :token 7 # get "/sign_up", to: "registrations#new", as: :sign_up 8 # post "/sign_up", to: "registrations#create" 9 # delete "/log_out", to: "sessions#destroy", as: :log_out 10 11 post "/code_of_honor/toggle", 12 to: "code_of_honor#toggle", 13 as: :toggle_code_of_honor 14 15 post "/accept_cookies", 16 to: "sessions#accept_cookies", 17 as: :accept_cookies 18 19 post "/gift_nico", 20 to: "sessions#gift_nico", 21 as: :gift_nico 22 23 resources :tartiflettes do 24 get "scores/edit", 25 to: "scores#edit_all", 26 as: :edit_scores 27 patch "scores", 28 to: "scores#update_all", 29 as: :update_scores 30 resources :scores, only: [ :new, :create ] 31 end 32 33 namespace :admin do 34 get "dashboard", 35 to: "dashboard#index", 36 as: :dashboard 37 get "scores/export", 38 to: "scores#export", 39 as: :scores_export 40 end 41 42 # Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html 43 44 # Reveal health status on /up that returns 200 if the app boots with no exceptions, otherwise 500. 45 # Can be used by load balancers and uptime monitors to verify that the app is live. 46 get "up" => "rails/health#show", as: :rails_health_check 47 48 # Render dynamic PWA files from app/views/pwa/* (remember to link manifest in application.html.erb) 49 # get "manifest" => "rails/pwa#manifest", as: :pwa_manifest 50 # get "service-worker" => "rails/pwa#service_worker", as: :pwa_service_worker 51 52 # Defines the root path route ("/") 53 # root "posts#index" 54 end 55