From 01ecc8011899949c19a1f58d715eb020bea4f387 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Thu, 14 Mar 2024 05:18:31 -0400 Subject: [PATCH] Add module `accounts` route scope in api routes (#29582) --- config/routes/api.rb | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/config/routes/api.rb b/config/routes/api.rb index 07340a634..d2d0e3900 100644 --- a/config/routes/api.rb +++ b/config/routes/api.rb @@ -181,12 +181,14 @@ namespace :api, format: false do end resources :accounts, only: [:create, :show] do - resources :statuses, only: :index, controller: 'accounts/statuses' - resources :followers, only: :index, controller: 'accounts/follower_accounts' - resources :following, only: :index, controller: 'accounts/following_accounts' - resources :lists, only: :index, controller: 'accounts/lists' - resources :identity_proofs, only: :index, controller: 'accounts/identity_proofs' - resources :featured_tags, only: :index, controller: 'accounts/featured_tags' + scope module: :accounts do + resources :statuses, only: :index + resources :followers, only: :index, controller: :follower_accounts + resources :following, only: :index, controller: :following_accounts + resources :lists, only: :index + resources :identity_proofs, only: :index + resources :featured_tags, only: :index + end member do post :follow