/
routes.rb
48 lines (37 loc) · 1.04 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
Rails.application.routes.draw do
devise_for :admins
mount RailsAdmin::Engine => '/admin', as: 'rails_admin'
get 'api_helpers/password_compare'
scope '/api' do
scope '/v1' do
scope '/feed' do
get '/' => 'api_helpers#public_feed'
get '/:username' => 'api_helpers#public_feed_for_user'
end
scope '/articles' do
post '/' => 'api_helpers#article_create'
get '/' => 'api_helpers#articles_list'
end
scope '/users' do
post '/' => 'api_helpers#user_create'
scope '/auth' do
post '/' => 'api_helpers#user_signin'
end
end
end
end
get 'search' => 'search#index'
scope '/about/' do
get '/' => 'static#about'
end
get 'list_articles/index'
get '/feed' => 'list_articles#feed'
get 'user/export_articles'
devise_for :users
resources :article
get 'users' => 'user#index'
get ':username' => 'user#public_page'
get 'article/:id/share' => 'article#share'
post 'article/:id/share' => 'article#send_share'
root 'static#index'
end