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

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