chore(lint): format with crystal tool

This commit is contained in:
Richard Lora 2024-07-01 14:48:55 -04:00
parent ba7e504fd1
commit bfe51590b1
2 changed files with 3 additions and 4 deletions

View File

@ -156,7 +156,6 @@ class Config
@pages_enabled[page]? || false
end
def self.load
# Load config from file or YAML string env var
env_config_file = "INVIDIOUS_CONFIG_FILE"

View File

@ -195,9 +195,9 @@ module Invidious::Routes::PreferencesRoute
CONFIG.default_user_preferences.feed_menu = admin_feed_menu
pages_enabled = {
"popular" => (env.params.body["popular_enabled"]?.try &.as(String) || "off") == "on",
"popular" => (env.params.body["popular_enabled"]?.try &.as(String) || "off") == "on",
"trending" => (env.params.body["trending_enabled"]?.try &.as(String) || "off") == "on",
"search" => (env.params.body["search_enabled"]?.try &.as(String) || "off") == "on"
"search" => (env.params.body["search_enabled"]?.try &.as(String) || "off") == "on",
}
CONFIG.pages_enabled = pages_enabled
@ -350,4 +350,4 @@ module Invidious::Routes::PreferencesRoute
env.redirect referer
end
end
end