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
|
2014-03-30 22:14:59 +08:00
|
|
|
resources :comments, only: [:index, :create]
|
2014-03-31 23:11:40 +08:00
|
|
|
resources :likes, only: [:index, :create, :destroy] do
|
|
|
|
member do
|
|
|
|
get :is_liked
|
|
|
|
end
|
|
|
|
end
|
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
|
2014-04-03 16:49:59 +08:00
|
|
|
resources :subscribes do
|
|
|
|
collection do
|
|
|
|
post :cancel
|
|
|
|
end
|
|
|
|
end
|
|
|
|
get '/unsubscribe' => 'subscribes#index'
|
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
|
2012-06-24 05:13:09 +08:00
|
|
|
resources :posts do
|
|
|
|
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-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'
|
2012-06-23 06:19:03 +08:00
|
|
|
end
|