2012-06-23 06:19:03 +08:00
|
|
|
WBlog::Application.routes.draw do
|
2014-03-30 23:10:26 +08:00
|
|
|
|
2014-04-01 19:43:48 +08:00
|
|
|
resources :blogs, :only=>[:index, :show, :edit] do
|
2012-06-25 00:09:44 +08:00
|
|
|
collection do
|
|
|
|
get :rss
|
|
|
|
end
|
2016-04-28 11:18:53 +08:00
|
|
|
resources :comments, only: [:index, :create] do
|
|
|
|
collection do
|
|
|
|
get :refresh
|
|
|
|
end
|
|
|
|
end
|
2016-11-07 14:58:04 +08:00
|
|
|
resources :likes, only: [:index, :create, :destroy]
|
2012-06-25 00:09:44 +08:00
|
|
|
end
|
|
|
|
|
2014-03-30 22:14:59 +08:00
|
|
|
|
2014-03-30 08:16:38 +08:00
|
|
|
resources :archives
|
2016-04-26 00:20:14 +08:00
|
|
|
resources :subscribes, only: [:index, :new, :create]
|
|
|
|
|
|
|
|
resources :unsubscribes, only: [:index, :new, :create]
|
2012-06-25 00:09:44 +08:00
|
|
|
# photos
|
2014-04-02 12:45:29 +08:00
|
|
|
resources :photos, only: [:create]
|
|
|
|
get '/qrcodes' => 'qrcodes#show'
|
2016-04-20 23:36:51 +08:00
|
|
|
|
2012-06-23 12:07:24 +08:00
|
|
|
namespace :admin do
|
2016-04-21 18:07:55 +08:00
|
|
|
resources :posts, except: [:show] do
|
2012-06-24 05:13:09 +08:00
|
|
|
collection do
|
|
|
|
post :preview
|
|
|
|
end
|
2014-05-25 10:33:28 +08:00
|
|
|
resources :comments
|
2012-06-24 05:13:09 +08:00
|
|
|
end
|
2014-04-01 08:28:21 +08:00
|
|
|
resources :sessions, :only=>[:new, :create, :destroy]
|
2016-04-27 15:42:44 +08:00
|
|
|
resources :subscribes, only: [:index] do
|
|
|
|
member do
|
|
|
|
post :enable
|
|
|
|
post :disable
|
|
|
|
end
|
|
|
|
end
|
2016-04-20 23:36:51 +08:00
|
|
|
root 'dashboard#index'
|
2012-06-23 12:07:24 +08:00
|
|
|
end
|
2014-04-01 08:28:21 +08:00
|
|
|
|
2014-03-28 21:31:21 +08:00
|
|
|
get '/about' => 'home#index'
|
2014-12-26 01:58:26 +08:00
|
|
|
get '/mobile' => 'home#mobile'
|
2016-04-20 23:36:51 +08:00
|
|
|
|
|
|
|
root 'blogs#index'
|
2016-04-28 11:18:53 +08:00
|
|
|
|
|
|
|
mount ActionCable.server => '/cable'
|
2012-06-23 06:19:03 +08:00
|
|
|
end
|