From 2d78e35e16d8121b3191466aa55fb44aeae2f5de Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Sun, 20 Oct 2019 20:58:50 -0400 Subject: [PATCH] Fix typo in syncing user preferences --- src/invidious.cr | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/invidious.cr b/src/invidious.cr index 30688db3..4f1b2b7a 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -2032,7 +2032,7 @@ post "/preferences" do |env| PG_DB.exec("UPDATE users SET preferences = $1 WHERE email = $2", preferences, user.email) if config.admins.includes? user.email - 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 5.times do |index| @@ -2041,7 +2041,7 @@ post "/preferences" do |env| admin_feed_menu << option end end - CONFIG.default_user_preferences.feed_menu = admin_feed_menu + config.default_user_preferences.feed_menu = admin_feed_menu top_enabled = env.params.body["top_enabled"]?.try &.as(String) top_enabled ||= "off" @@ -2063,6 +2063,7 @@ post "/preferences" do |env| statistics_enabled ||= "off" config.statistics_enabled = statistics_enabled == "on" + CONFIG.default_user_preferences = config.default_user_preferences File.write("config/config.yml", config.to_yaml) end else