From 189175fe8470e3637f071d66ff7329e3ac8e833b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=BF=E3=81=A6=E3=82=8B=E3=81=9E?= Date: Sun, 11 Jan 2026 23:09:23 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=B8=8D=E8=A6=81=E3=82=BD=E3=83=BC?= =?UTF-8?q?=E3=82=B9=E3=81=AE=E5=89=8A=E9=99=A4=EF=BC=88#214=EF=BC=89=20(#?= =?UTF-8?q?216)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #214 #214 Co-authored-by: miteruzo Reviewed-on: https://git.miteruzo.com/miteruzo/btrc-hub/pulls/216 --- .../controllers/ip_addresses_controller.rb | 20 ------------------- .../nico_tag_relation_controller.rb | 16 --------------- .../app/controllers/post_tags_controller.rb | 16 --------------- backend/app/controllers/posts_controller.rb | 4 ---- .../app/controllers/settings_controller.rb | 16 --------------- .../app/controllers/tag_aliases_controller.rb | 16 --------------- backend/app/controllers/tags_controller.rb | 9 --------- .../app/controllers/user_ips_controller.rb | 16 --------------- .../controllers/user_post_views_controller.rb | 16 --------------- backend/config/routes.rb | 12 ++--------- 10 files changed, 2 insertions(+), 139 deletions(-) delete mode 100644 backend/app/controllers/ip_addresses_controller.rb delete mode 100644 backend/app/controllers/nico_tag_relation_controller.rb delete mode 100644 backend/app/controllers/post_tags_controller.rb delete mode 100644 backend/app/controllers/settings_controller.rb delete mode 100644 backend/app/controllers/tag_aliases_controller.rb delete mode 100644 backend/app/controllers/user_ips_controller.rb delete mode 100644 backend/app/controllers/user_post_views_controller.rb diff --git a/backend/app/controllers/ip_addresses_controller.rb b/backend/app/controllers/ip_addresses_controller.rb deleted file mode 100644 index 5ede22a..0000000 --- a/backend/app/controllers/ip_addresses_controller.rb +++ /dev/null @@ -1,20 +0,0 @@ -class IpAddressesController < ApplicationController - def index - @ip_addresses = IpAddress.all - - render json: @ip_addresses - end - - def show - render json: @ip_address - end - - def create - end - - def update - end - - def destroy - end -end diff --git a/backend/app/controllers/nico_tag_relation_controller.rb b/backend/app/controllers/nico_tag_relation_controller.rb deleted file mode 100644 index 974f20e..0000000 --- a/backend/app/controllers/nico_tag_relation_controller.rb +++ /dev/null @@ -1,16 +0,0 @@ -class NicoTagRelationController < ApplicationController - def index - end - - def show - end - - def create - end - - def update - end - - def destroy - end -end diff --git a/backend/app/controllers/post_tags_controller.rb b/backend/app/controllers/post_tags_controller.rb deleted file mode 100644 index 467074e..0000000 --- a/backend/app/controllers/post_tags_controller.rb +++ /dev/null @@ -1,16 +0,0 @@ -class PostTagsController < ApplicationController - def index - end - - def show - end - - def create - end - - def update - end - - def destroy - end -end diff --git a/backend/app/controllers/posts_controller.rb b/backend/app/controllers/posts_controller.rb index a3a4538..0792bf7 100644 --- a/backend/app/controllers/posts_controller.rb +++ b/backend/app/controllers/posts_controller.rb @@ -141,10 +141,6 @@ class PostsController < ApplicationController end end - # DELETE /posts/1 - def destroy - end - def changes id = params[:id] page = (params[:page].presence || 1).to_i diff --git a/backend/app/controllers/settings_controller.rb b/backend/app/controllers/settings_controller.rb deleted file mode 100644 index 379ca82..0000000 --- a/backend/app/controllers/settings_controller.rb +++ /dev/null @@ -1,16 +0,0 @@ -class SettingsController < ApplicationController - def index - end - - def show - end - - def create - end - - def update - end - - def destroy - end -end diff --git a/backend/app/controllers/tag_aliases_controller.rb b/backend/app/controllers/tag_aliases_controller.rb deleted file mode 100644 index cbfd36f..0000000 --- a/backend/app/controllers/tag_aliases_controller.rb +++ /dev/null @@ -1,16 +0,0 @@ -class TagAliasesController < ApplicationController - def index - end - - def show - end - - def create - end - - def update - end - - def destroy - end -end diff --git a/backend/app/controllers/tags_controller.rb b/backend/app/controllers/tags_controller.rb index 6597a43..7c1b250 100644 --- a/backend/app/controllers/tags_controller.rb +++ b/backend/app/controllers/tags_controller.rb @@ -34,13 +34,4 @@ class TagsController < ApplicationController head :not_found end end - - def create - end - - def update - end - - def destroy - end end diff --git a/backend/app/controllers/user_ips_controller.rb b/backend/app/controllers/user_ips_controller.rb deleted file mode 100644 index c02396b..0000000 --- a/backend/app/controllers/user_ips_controller.rb +++ /dev/null @@ -1,16 +0,0 @@ -class UserIpsController < ApplicationController - def index - end - - def show - end - - def create - end - - def update - end - - def destroy - end -end diff --git a/backend/app/controllers/user_post_views_controller.rb b/backend/app/controllers/user_post_views_controller.rb deleted file mode 100644 index 2bcefcd..0000000 --- a/backend/app/controllers/user_post_views_controller.rb +++ /dev/null @@ -1,16 +0,0 @@ -class UserPostViewsController < ApplicationController - def index - end - - def show - end - - def create - end - - def update - end - - def destroy - end -end diff --git a/backend/config/routes.rb b/backend/config/routes.rb index 206d1a6..c7afe8f 100644 --- a/backend/config/routes.rb +++ b/backend/config/routes.rb @@ -1,7 +1,7 @@ Rails.application.routes.draw do resources :nico_tags, path: 'tags/nico', only: [:index, :update] - resources :tags do + resources :tags, only: [:index, :show] do collection do get :autocomplete get 'name/:name', action: :show_by_name @@ -30,7 +30,7 @@ Rails.application.routes.draw do end end - resources :posts do + resources :posts, only: [:index, :show, :create, :update] do collection do get :random get :changes @@ -49,12 +49,4 @@ Rails.application.routes.draw do post 'code/renew', action: :renew end end - - resources :ip_addresses - resources :nico_tag_relations - resources :post_tags - resources :settings - resources :tag_aliases - resources :user_ips - resources :user_post_views end