-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathroutes.rb
48 lines (42 loc) · 1.36 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
scope PluginRoutes.system_info["relative_url_root"] do
use_doorkeeper
#Admin Panel
scope 'admin', as: 'admin' do
namespace 'plugins' do
namespace 'camaleon_oauth' do
get 'index' => 'admin#index'
get 'documentation' => redirect('/docs/index.html')
end
end
end
#Api methods
scope module: "plugins", as: "plugins" do
scope module: 'camaleon_oauth', as: 'camaleon_oauth' do
namespace :api do
get 'account' => 'api#account'
namespace :v1 do
get 'categories' => 'category#categories'
get 'pages' => 'page#index'
scope :posts do
get '*' => 'post#index'
get 'slug/:slug' => 'post#slug'
get ':id' => 'post#show'
get 'category_id/:category_id' => 'post#category_id'
get 'category_name/:category_name' => 'post#category_name'
get 'featured' => 'post#featured'
end
scope :users do
get '*' => 'user#users'
post 'create' => 'user#create'
end
scope :contact_form do
get 'show/:slug' => 'contact_form#contact_form_by_slug'
post 'create' => 'contact_form#save_form'
end
end
end
end
end
end
end