52aa1615b6
#63 #63 #63 #63 Co-authored-by: miteruzo <miteruzo@naver.com> Reviewed-on: #341
95 lines
2.1 KiB
Ruby
95 lines
2.1 KiB
Ruby
Rails.application.routes.draw do
|
|
resources :nico_tags, path: 'tags/nico', only: [:index, :update]
|
|
|
|
scope 'tags/:parent_id/children', controller: :tag_children do
|
|
post ':child_id', action: :create
|
|
delete ':child_id', action: :destroy
|
|
end
|
|
|
|
resources :tags, only: [:index, :show] do
|
|
collection do
|
|
get :autocomplete
|
|
get :'with-depth', action: :with_depth
|
|
get :versions, to: 'tag_versions#index'
|
|
|
|
scope :name do
|
|
get ':name/deerjikists', action: :deerjikists_by_name
|
|
get ':name/materials', action: :materials_by_name
|
|
get ':name', action: :show_by_name
|
|
end
|
|
end
|
|
|
|
member do
|
|
put '', action: :update_all
|
|
patch '', action: :update
|
|
|
|
get :deerjikists
|
|
put :deerjikists, action: :update_deerjikists
|
|
end
|
|
end
|
|
|
|
scope :preview, controller: :preview do
|
|
get :title
|
|
get :thumbnail
|
|
end
|
|
|
|
resources :wiki_pages, path: 'wiki', only: [:index, :show, :create, :update] do
|
|
collection do
|
|
get :search
|
|
get :changes
|
|
|
|
scope :title do
|
|
get ':title/exists', action: :exists_by_title
|
|
get ':title', action: :show_by_title
|
|
end
|
|
end
|
|
|
|
member do
|
|
get :exists
|
|
get :diff
|
|
end
|
|
end
|
|
|
|
resources :posts, only: [:index, :show, :create, :update] do
|
|
collection do
|
|
get :random
|
|
get :changes
|
|
get :versions, to: 'post_versions#index'
|
|
end
|
|
|
|
member do
|
|
post :viewed
|
|
delete :viewed, action: :unviewed
|
|
end
|
|
end
|
|
|
|
resources :users, only: [:create, :update] do
|
|
collection do
|
|
post :verify
|
|
get :me
|
|
post 'code/renew', action: :renew
|
|
end
|
|
end
|
|
|
|
resources :deerjikists, only: [] do
|
|
collection do
|
|
scope ':platform/:code' do
|
|
get '', action: :show
|
|
put '', action: :update
|
|
delete '', action: :destroy
|
|
end
|
|
end
|
|
end
|
|
|
|
resources :theatres, only: [:show] do
|
|
member do
|
|
put :watching
|
|
patch :next_post
|
|
end
|
|
|
|
resources :comments, controller: :theatre_comments, only: [:index, :create]
|
|
end
|
|
|
|
resources :materials, only: [:index, :show, :create, :update, :destroy]
|
|
end
|