Change Forum Backend Routes

This commit is contained in:
sylor_huang@126.com 2020-10-14 15:50:09 +08:00
parent 20dd1aeedf
commit 1f42076d20
1 changed files with 25 additions and 23 deletions

View File

@ -7,29 +7,7 @@ Rails.application.routes.draw do
# Serve websocket cable requests in-process
mount ActionCable.server => '/cable'
resources :forums do
member do
get "detail"
end
collection do
match '/manage/:id/', :to => 'forums#manage', :via => :get
match '/theme/:id/', :to => 'forums#theme', :via => :get
resources :plates, only: [:show, :index] do
get 'all'
get 'is_fine'
get 'my_memos'
get 'my_topics'
end
resources :categories do
collection do
get 'all', :via => [:get, :post]
get 'guide', :via => [:get, :post]
get 'techShare'
get 'shixun_discuss'
end
end
end
end
get 'attachments/entries/get_file', to: 'attachments#get_file'
get 'attachments/download/:id', to: 'attachments#show'
get 'attachments/download/:id/:filename', to: 'attachments#show'
@ -756,6 +734,30 @@ Rails.application.routes.draw do
end
end
resources :forums, only: [:index, :new, :edit, :show] do
member do
get "detail"
end
collection do
match '/manage/:id/', :to => 'forums#manage', :via => :get
match '/theme/:id/', :to => 'forums#theme', :via => :get
resources :plates, only: [:show, :index] do
get 'all'
get 'is_fine'
get 'my_memos'
get 'my_topics'
end
resources :categories do
collection do
get 'all', :via => [:get, :post]
get 'guide', :via => [:get, :post]
get 'techShare'
get 'shixun_discuss'
end
end
end
end
#git 认证回调
match 'gitauth/*url', to: 'gits#auth', via: :all