|
|
@ -74,7 +74,7 @@ class Invidious::Routes::UserPreferences < Invidious::Routes::BaseRoute
|
|
|
|
default_home = env.params.body["default_home"]?.try &.as(String) || CONFIG.default_user_preferences.default_home
|
|
|
|
default_home = env.params.body["default_home"]?.try &.as(String) || CONFIG.default_user_preferences.default_home
|
|
|
|
|
|
|
|
|
|
|
|
feed_menu = [] of String
|
|
|
|
feed_menu = [] of String
|
|
|
|
5.times do |index|
|
|
|
|
4.times do |index|
|
|
|
|
option = env.params.body["feed_menu[#{index}]"]?.try &.as(String) || ""
|
|
|
|
option = env.params.body["feed_menu[#{index}]"]?.try &.as(String) || ""
|
|
|
|
if !option.empty?
|
|
|
|
if !option.empty?
|
|
|
|
feed_menu << option
|
|
|
|
feed_menu << option
|
|
|
@ -146,7 +146,7 @@ class Invidious::Routes::UserPreferences < Invidious::Routes::BaseRoute
|
|
|
|
config.default_user_preferences.default_home = env.params.body["admin_default_home"]?.try &.as(String) || config.default_user_preferences.default_home
|
|
|
|
config.default_user_preferences.default_home = env.params.body["admin_default_home"]?.try &.as(String) || config.default_user_preferences.default_home
|
|
|
|
|
|
|
|
|
|
|
|
admin_feed_menu = [] of String
|
|
|
|
admin_feed_menu = [] of String
|
|
|
|
5.times do |index|
|
|
|
|
4.times do |index|
|
|
|
|
option = env.params.body["admin_feed_menu[#{index}]"]?.try &.as(String) || ""
|
|
|
|
option = env.params.body["admin_feed_menu[#{index}]"]?.try &.as(String) || ""
|
|
|
|
if !option.empty?
|
|
|
|
if !option.empty?
|
|
|
|
admin_feed_menu << option
|
|
|
|
admin_feed_menu << option
|
|
|
|