ぼざクリタグ広場 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.
 
 
 
 
 

94 lines
2.0 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. end
  23. end
  24. scope :preview, controller: :preview do
  25. get :title
  26. get :thumbnail
  27. end
  28. resources :wiki_pages, path: 'wiki', only: [:index, :show, :create, :update] do
  29. collection do
  30. get :search
  31. get :changes
  32. scope :title do
  33. get ':title/exists', action: :exists_by_title
  34. get ':title', action: :show_by_title
  35. end
  36. end
  37. member do
  38. get :exists
  39. get :diff
  40. end
  41. end
  42. resources :posts, only: [:index, :show, :create, :update] do
  43. collection do
  44. get :random
  45. get :changes
  46. get :versions, to: 'post_versions#index'
  47. end
  48. member do
  49. post :viewed
  50. delete :viewed, action: :unviewed
  51. end
  52. end
  53. resources :users, only: [:create, :update] do
  54. collection do
  55. post :verify
  56. get :me
  57. post 'code/renew', action: :renew
  58. end
  59. end
  60. resources :deerjikists, only: [] do
  61. collection do
  62. scope ':platform/:code' do
  63. get '', action: :show
  64. put '', action: :update
  65. delete '', action: :destroy
  66. end
  67. end
  68. end
  69. resources :theatres, only: [:show] do
  70. member do
  71. put :watching
  72. patch :next_post
  73. end
  74. resources :comments, controller: :theatre_comments, only: [:index, :create]
  75. end
  76. resources :materials, only: [:index, :show, :create, :update, :destroy]
  77. end