forked from 24pullrequests/24pullrequests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathroutes.rb
95 lines (73 loc) · 2.65 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
Tfpullrequests::Application.routes.draw do
get '/404', to: 'errors#not_found'
get '/422', to: 'errors#unprocessable'
get '/500', to: 'errors#internal'
get '/locale/:locale', to: 'dashboards#locale', as: :locale
resources :gifts, except: [:show]
resources :users, only: [:show, :index]
resources :organisations, only: [:show, :index]
get '/mergers', to: 'users#mergers', as: :mergers
get '/users/:id', to: 'users#show'
get '/users/unsubscribe/:token', to: 'users#unsubscribe', as: :user_unsubscribe
resources :events
resources :projects do
collection do
get :autofill
post :claim
end
member do
put :reactivate
end
end
resources :contributions do
collection do
get :meta
end
end
resources :pull_requests, only: [:index], controller: 'contributions' do
collection do
get :meta
end
end
resource :dashboard, only: [:show, :destroy] do
member do
get :delete
delete :destroy
end
end
resource :pull_request_download, only: :create
get '/resend_confirmation', to: 'dashboards#resend_confirmation_email', as: 'resend_confirmation'
get '/confirm/:confirmation_token', to: 'dashboards#confirm_email', as: 'confirm_email'
get '/preferences', to: 'dashboards#preferences', as: 'preferences'
patch '/preferences/update', to: 'dashboards#update_preferences', as: 'update_preferences'
get :my_suggestions, to: 'users#projects', as: :my_suggestions
get '/login', to: 'sessions#new', as: 'login'
get '/logout', to: 'sessions#destroy', as: 'logout'
get '/contributors/map', to: 'contributor_map#show'
get '/auth/twitter/callback', to: 'twitter#authorize'
delete '/twitter/remove', to: 'twitter#remove'
match '/auth/:provider/callback', to: 'sessions#create', via: [:get, :post]
get '/auth/failure', to: 'sessions#failure'
get 'about', to: 'static#about'
get 'sponsors' => redirect('/about') # old sponsors url
get 'humans', to: 'static#humans'
get 'api', to: 'static#api'
get 'contributing', to: 'static#contributing'
get '2018', to: 'static#2018'
get '/unsubscribe', to: 'unsubscribes#new', as: :unsubscribe
post '/unsubscribe', to: 'unsubscribes#create'
resources :languages, only: [:show] do
member do
get :projects
get :pull_requests
get :users
end
end
root to: 'static#homepage'
get '/email' => redirect('/preferences') # old preferences URL
get '/:id' => redirect('/users/%{id}') # User public vanity url, must be lowest priority
namespace :admin do
post '/dasher', to: 'dasher#new_pull_request'
resources :projects, only: [:index, :edit, :update, :destroy]
end
end