From b95393b6bea8dbca694396663c99b259e5fd15ac Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Wed, 26 Jun 2024 11:38:16 -0400 Subject: [PATCH 1/2] Use `with_options` for shared settings option in `admin` routes --- config/routes/admin.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/config/routes/admin.rb b/config/routes/admin.rb index 207cb0580dc..1ef2ebbc27c 100644 --- a/config/routes/admin.rb +++ b/config/routes/admin.rb @@ -40,8 +40,10 @@ namespace :admin do end end - get '/settings', to: redirect('/admin/settings/branding') - get '/settings/edit', to: redirect('/admin/settings/branding') + with_options to: redirect('/admin/settings/branding') do + get '/settings' + get '/settings/edit' + end namespace :settings do resource :branding, only: [:show, :update], controller: 'branding' From 982f5077396c614dc133554ebbd8c19758abc003 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Fri, 5 Jul 2024 11:00:51 -0400 Subject: [PATCH 2/2] Add api streaming case --- config/routes/api.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/config/routes/api.rb b/config/routes/api.rb index 90119166974..e8c46e73075 100644 --- a/config/routes/api.rb +++ b/config/routes/api.rb @@ -44,8 +44,10 @@ namespace :api, format: false do resources :list, only: :show end - get '/streaming', to: 'streaming#index' - get '/streaming/(*any)', to: 'streaming#index' + with_options to: 'streaming#index' do + get '/streaming' + get '/streaming/(*any)' + end resources :custom_emojis, only: [:index] resources :suggestions, only: [:index, :destroy]