/
routes.rb
173 lines (162 loc) · 4.81 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
Openphin::Application.routes.draw do
resources :roles
resources :jurisdictions do
collection do
get :user_alerting
get :user_alerter
end
end
resources :audiences, :only => [:index] do
collection do
get :jurisdictions
get :jurisdictions_flat
post :jurisdictions_flat
get :roles
get :groups
get :determine_recipients
post :determine_recipients
get :recipients
end
end
resources :users do
resource :profile, :controller => "user_profiles", :except => [:destroy]
resources :devices, :only => [:create, :destroy]
match '/is_admin.:format' => 'users#is_admin', :as => :is_admin, :via => [:get]
end
resource :search do
member do
post :show_advanced
get :show_advanced
post :show_clean
get :show_clean
end
end
namespace :admin do
resources :organizations do
collection do
post :confirmation
get :requests
end
end
resources :organization_membership_requests, :only => [:index, :update, :destroy]
resources :groups do
match '/dismember/:member_id(.:format)' => '#dismember', :as => :dismember, :via => :post
end
resources :role_requests, :except => [:edit, :update] do
member do
get :approve
get :deny
end
end
resources :invitations, :only => [:index, :show, :create] do
collection do
post :import
get :recipe_types
end
get :download, :on => :member
end
resources :users, :only => [:new, :create] do
post :deactivate, :on => :collection
end
resources :edit_users, :only => [:update] do
get :admin_users, :on => :collection
end
resources :user_batch, :only => [:new, :create] do
collection do
post :import
get :admin_jurisdictions
put :create_from_json
end
get :user_batch, :on => :member
end
resources :delayed_job_checks
resources :app, defaults: {format: :json} do
member do
put :upload
end
end
resources :roles, except: [:new, :show, :edit], defaults: {format: :json}
end
resources :role_assignments, :controller => 'admin/role_assignments'
resources :alerts, :only => [:show, :update] do
get :recent_alerts, :on => :collection
end
match '/alerts/:id/show_with_token/:token(.:format)' => 'alerts#show_with_token', :as => :alert_with_token, :method => :get
match '/alerts/:id/update_with_token/:token(.:format)' => 'alerts#update_with_token', :as => :update_alert_with_token, :method => :put
match "/alerts/:id/update(.:format)" => "alerts#update", :as => :update_alert, :method => :put
# CORS requirement for iPhone
match "/alerts/:id/update(.:format)", :to => "application#options", :via => [:options]
resources :organizations, :only => [:index]
resources :role_requests, :only => [:new, :create]
resources :devices, :only => [:create, :destroy]
resources :favorites, :only => [:create, :index, :destroy]
resources :apps, :only => [:index, :update] do
get :available, :on => :collection
end
match "/info", :to => "apps#info"
resources :documents, :controller => 'doc/documents', :except => [:index] do
collection do
get :search
get :recent_documents
end
member do
post :move
put :move
post :copy
put :copy
end
end
resources :folders, :controller => 'doc/folders' do
get :target_folders, :on => :collection
member do
post :move
put :move
end
end
resources :shares do
member do
delete :unsubscribe
get :edit_audience
put :update_audience
end
end
resources :forums do
resources :topics do
collection do
get :active_topics
get :recent_posts
end
put :update_comments, :on => :member
end
end
namespace :report do
resources :reports do
member do
get :filters
post :reduce
end
end
resources :recipes, :only => [:index, :show]
end
resources :audits do
get :models, :on => :collection
end
match '/rss_feed.:format' => 'rss_feed#index', :as => :rss_feed, :via => [:get, :post]
resources :tutorials
match '/*path(.:format)' => 'application#options', :via => :options
resources :dashboard do
collection do
get :all
get :menu
get :faqs
end
end
root :to => 'dashboard#index', :format => 'ext'
match '/about' => 'apps#info', :as => :about_dashboard
match '/about_talhophin' => 'dashboard#about_talhophin', :as => :about_talhophin
match '/han(.:format)' => 'dashboard#hud', :as => :hud
match '/ext' => 'dashboard#index', :as => :ext, :format => 'ext'
resources :sessions, :only => [:new, :create, :destroy]
match '/sign_out' => 'sessions#destroy', :as => :sign_out, :method => :delete
match '/sign_in' => 'sessions#new', :as => :sign_in
end