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
|
Rails.application.routes.draw do
root to: "home#index"
resource :session
resource :registration, only: [ "new", "create" ]
resources :passwords, param: :token
# get "/sign_up", to: "registrations#new", as: :sign_up
# post "/sign_up", to: "registrations#create"
# delete "/log_out", to: "sessions#destroy", as: :log_out
post "/code_of_honor/toggle",
to: "code_of_honor#toggle",
as: :toggle_code_of_honor
post "/accept_cookies",
to: "sessions#accept_cookies",
as: :accept_cookies
post "/gift_nico",
to: "sessions#gift_nico",
as: :gift_nico
resources :tartiflettes do
get "scores/edit",
to: "scores#edit_all",
as: :edit_scores
patch "scores",
to: "scores#update_all",
as: :update_scores
resources :scores, only: [ :new, :create ]
end
namespace :admin do
get "dashboard",
to: "dashboard#index",
as: :dashboard
get "scores/export",
to: "scores#export",
as: :scores_export
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
# Render dynamic PWA files from app/views/pwa/* (remember to link manifest in application.html.erb)
# get "manifest" => "rails/pwa#manifest", as: :pwa_manifest
# get "service-worker" => "rails/pwa#service_worker", as: :pwa_service_worker
# Defines the root path route ("/")
# root "posts#index"
end
|