From 18ffd4d925030a3d3a3826bc7156d3a22a44d78e Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Thu, 14 Mar 2024 05:18:36 -0400 Subject: [PATCH] Add module `instances` route scope in api routes (#29581) --- config/routes/api.rb | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/config/routes/api.rb b/config/routes/api.rb index d2d0e3900..60fb0394e 100644 --- a/config/routes/api.rb +++ b/config/routes/api.rb @@ -125,14 +125,16 @@ namespace :api, format: false do end resource :instance, only: [:show] do - resources :peers, only: [:index], controller: 'instances/peers' - resources :rules, only: [:index], controller: 'instances/rules' - resources :domain_blocks, only: [:index], controller: 'instances/domain_blocks' - resource :privacy_policy, only: [:show], controller: 'instances/privacy_policies' - resource :extended_description, only: [:show], controller: 'instances/extended_descriptions' - resource :translation_languages, only: [:show], controller: 'instances/translation_languages' - resource :languages, only: [:show], controller: 'instances/languages' - resource :activity, only: [:show], controller: 'instances/activity' + scope module: :instances do + resources :peers, only: [:index] + resources :rules, only: [:index] + resources :domain_blocks, only: [:index] + resource :privacy_policy, only: [:show] + resource :extended_description, only: [:show] + resource :translation_languages, only: [:show] + resource :languages, only: [:show] + resource :activity, only: [:show], controller: :activity + end end namespace :peers do