mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-04-11.git
synced 2024-08-15 00:43:26 +00:00
Fix typo in syncing user preferences
This commit is contained in:
parent
7524b5e349
commit
2d78e35e16
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue