ぼざクリタグ広場 https://hub.nizika.monster
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

97 lines
2.1 KiB

  1. Rails.application.routes.draw do
  2. resources :nico_tags, path: 'tags/nico', only: [:index, :update]
  3. scope 'tags/:parent_id/children', controller: :tag_children do
  4. post ':child_id', action: :create
  5. delete ':child_id', action: :destroy
  6. end
  7. resources :tags, only: [:index, :show] do
  8. collection do
  9. get :autocomplete
  10. get :'with-depth', action: :with_depth
  11. get :versions, to: 'tag_versions#index'
  12. scope :name do
  13. get ':name/deerjikists', action: :deerjikists_by_name
  14. get ':name/materials', action: :materials_by_name
  15. get ':name', action: :show_by_name
  16. end
  17. end
  18. member do
  19. put '', action: :update_all
  20. patch '', action: :update
  21. get :deerjikists
  22. put :deerjikists, action: :update_deerjikists
  23. end
  24. end
  25. scope :preview, controller: :preview do
  26. get :title
  27. get :thumbnail
  28. end
  29. resources :wiki_pages, path: 'wiki', only: [:index, :show, :create, :update] do
  30. collection do
  31. get :search
  32. get :changes
  33. scope :title do
  34. get ':title/exists', action: :exists_by_title
  35. get ':title', action: :show_by_title
  36. end
  37. end
  38. member do
  39. get :exists
  40. get :diff
  41. end
  42. resources :assets, controller: :wiki_assets, only: [:index, :create]
  43. end
  44. resources :posts, only: [:index, :show, :create, :update] do
  45. collection do
  46. get :random
  47. get :changes
  48. get :versions, to: 'post_versions#index'
  49. end
  50. member do
  51. post :viewed
  52. delete :viewed, action: :unviewed
  53. end
  54. end
  55. resources :users, only: [:create, :update] do
  56. collection do
  57. post :verify
  58. get :me
  59. post 'code/renew', action: :renew
  60. end
  61. end
  62. resources :deerjikists, only: [] do
  63. collection do
  64. scope ':platform/:code' do
  65. get '', action: :show
  66. put '', action: :update
  67. delete '', action: :destroy
  68. end
  69. end
  70. end
  71. resources :theatres, only: [:show] do
  72. member do
  73. put :watching
  74. patch :next_post
  75. end
  76. resources :comments, controller: :theatre_comments, only: [:index, :create]
  77. end
  78. resources :materials, only: [:index, :show, :create, :update, :destroy]
  79. end