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

95 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. end
  43. resources :posts, only: [:index, :show, :create, :update] do
  44. collection do
  45. get :random
  46. get :changes
  47. get :versions, to: 'post_versions#index'
  48. end
  49. member do
  50. post :viewed
  51. delete :viewed, action: :unviewed
  52. end
  53. end
  54. resources :users, only: [:create, :update] do
  55. collection do
  56. post :verify
  57. get :me
  58. post 'code/renew', action: :renew
  59. end
  60. end
  61. resources :deerjikists, only: [] do
  62. collection do
  63. scope ':platform/:code' do
  64. get '', action: :show
  65. put '', action: :update
  66. delete '', action: :destroy
  67. end
  68. end
  69. end
  70. resources :theatres, only: [:show] do
  71. member do
  72. put :watching
  73. patch :next_post
  74. end
  75. resources :comments, controller: :theatre_comments, only: [:index, :create]
  76. end
  77. resources :materials, only: [:index, :show, :create, :update, :destroy]
  78. end