-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathroutes.rb
149 lines (129 loc) · 4.88 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
Rails.application.routes.draw do
mount Tolk::Engine => '/tolk', :as => 'tolk' if Rails.env=='development'
root :to => 'todos#index'
post 'mailgun/mime' => 'mailgun#mailgun'
post 'login' => 'login#login'
get 'login' => 'login#login'
get 'login/check_expiry' => 'login#check_expiry'
get 'logout' => 'login#logout'
get "tickler" => "todos#list_deferred"
get 'review' => "projects#review"
get 'calendar' => "calendar#show"
get 'done' => "stats#done", :as => 'done_overview'
get 'search' => 'search#index'
post 'search/results' => 'search#results', :via => 'post'
get 'data' => "data#index"
get 'data/csv_notes' => 'data#csv_notes'
get 'data/yaml_export' => 'data#yaml_export'
get 'data/xml_export' => 'data#xml_export'
get 'data/csv_actions' => 'data#csv_actions'
get 'integrations' => "integrations#index"
get 'integrations/rest_api' => "integrations#rest_api", :as => 'rest_api_docs'
post 'integrations/cloudmailin' => 'integrations#cloudmailin'
get 'integrations/search_plugin' => "integrations#search_plugin", :as => 'search_plugin'
get 'preferences' => "preferences#index"
get 'preferences/render_date_format' => "preferences#render_date_format"
get 'feeds' => "feedlist#index", :as => 'feeds'
get 'feedlist/get_feeds_for_context' => 'feedlist#get_feeds_for_context'
get 'feedlist/get_feeds_for_project' => 'feedlist#get_feeds_for_project'
get 'stats' => 'stats#index'
get 'stats/actions_done_last12months_data' => 'stats#actions_done_last12months_data'
get 'stats/actions_done_last_years' => 'stats#actions_done_last_years'
get 'stats/actions_done_lastyears_data' => 'stats#actions_done_lastyears_data'
get 'stats/actions_done_last30days_data' => 'stats#actions_done_last30days_data'
get 'stats/actions_completion_time_data' => 'stats#actions_completion_time_data'
get 'stats/actions_running_time_data' => 'stats#actions_running_time_data'
get 'stats/actions_visible_running_time_data' => 'stats#actions_visible_running_time_data'
get 'stats/actions_open_per_week_data' => 'stats#actions_open_per_week_data'
get 'stats/context_total_actions_data' => 'stats#context_total_actions_data'
get 'stats/context_running_actions_data' => 'stats#context_running_actions_data'
get 'stats/actions_day_of_week_all_data' => 'stats#actions_day_of_week_all_data'
get 'stats/actions_day_of_week_30days_data' => 'stats#actions_day_of_week_30days_data'
get 'stats/actions_time_of_day_all_data' => 'stats#actions_time_of_day_all_data'
get 'stats/actions_time_of_day_30days_data' => 'stats#actions_time_of_day_30days_data'
get 'stats/show_selected_actions_from_chart/:id' => 'stats#show_selected_actions_from_chart', :as => 'show_actions_from_chart'
resources :contexts do
member do
get 'done_todos'
get 'all_done_todos'
end
collection do
post 'order'
get 'done'
end
resources :todos
end
resources :projects do
member do
get 'done_todos'
get 'all_done_todos'
get 'set_reviewed' # TODO: convert to PUT/POST
end
collection do
get 'done'
post 'order'
post 'alphabetize'
post 'actionize'
end
resources :todos
end
resources :todos do
member do
put 'toggle_check'
put 'toggle_star'
put 'defer'
get 'show_notes'
get 'convert_to_project' # TODO: convert to PUT/POST
delete 'remove_predecessor' # TODO: convert to PUT/POST
post 'change_context'
end
collection do
get 'done'
get 'all_done'
post 'check_deferred'
post 'filter_to_context'
post 'filter_to_project'
post 'add_predecessor'
end
end
# match /todos/tag and put everything in :name, including extensions like .m and .txt.
# This means the controller action needs to parse the extension and set format/content type
# Needed for /todos/tag/first.last.m to work
get 'todos/tag/:name' => 'todos#tag', :as => :tag, :format => false, :name => /.*/
get 'attachments/:id/:filename' => "todos#attachment"
get 'tags.autocomplete' => "todos#tags", :format => 'autocomplete'
get 'todos/done/tag/:name' => "todos#done_tag", :as => :done_tag
get 'todos/all_done/tag/:name' => "todos#all_done_tag", :as => :all_done_tag
get 'auto_complete_for_predecessor' => 'todos#auto_complete_for_predecessor'
get 'mobile' => 'todos#index', :format => 'm'
get 'm' => 'todos#index', :format => 'm'
resources :recurring_todos do
member do
put 'toggle_check'
put 'toggle_star'
end
collection do
get 'done'
end
end
resources :users do
member do
get 'change_password'
get 'change_auth_type'
get 'complete'
post 'update_password'
post 'update_auth_type'
post 'refresh_token'
end
end
get 'signup' => "users#new"
resources :notes
resources :preferences
resources :data do
collection do
get :import
post :csv_map
post :csv_import
end
end
end