mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2025-12-19 19:38:51 +00:00
Fix Style/VerboseBlock issues
This commit is contained in:
@@ -339,7 +339,7 @@ module Invidious::Routes::API::V1::Authenticated
|
||||
callback_url = env.params.body["callbackUrl"]?
|
||||
expire = env.params.body["expire"]?.try &.to_i?
|
||||
when "application/json"
|
||||
scopes = env.params.json["scopes"].as(Array).map { |v| v.as_s }
|
||||
scopes = env.params.json["scopes"].as(Array).map(&.as_s)
|
||||
callback_url = env.params.json["callbackUrl"]?.try &.as(String)
|
||||
expire = env.params.json["expire"]?.try &.as(Int64)
|
||||
else
|
||||
|
||||
@@ -20,7 +20,7 @@ module Invidious::Routes::API::V1::Search
|
||||
duration = env.params.query["duration"]?.try &.downcase
|
||||
duration ||= ""
|
||||
|
||||
features = env.params.query["features"]?.try &.split(",").map { |feature| feature.downcase }
|
||||
features = env.params.query["features"]?.try &.split(",").map(&.downcase)
|
||||
features ||= [] of String
|
||||
|
||||
content_type = env.params.query["type"]?.try &.downcase
|
||||
|
||||
@@ -30,7 +30,7 @@ module Invidious::Routes::Channels
|
||||
end
|
||||
end
|
||||
items = items.select(&.is_a?(SearchPlaylist)).map(&.as(SearchPlaylist))
|
||||
items.each { |item| item.author = "" }
|
||||
items.each(&.author=(""))
|
||||
else
|
||||
sort_options = {"newest", "oldest", "popular"}
|
||||
sort_by ||= "newest"
|
||||
@@ -58,7 +58,7 @@ module Invidious::Routes::Channels
|
||||
|
||||
items, continuation = fetch_channel_playlists(channel.ucid, channel.author, continuation, sort_by)
|
||||
items = items.select { |item| item.is_a?(SearchPlaylist) }.map { |item| item.as(SearchPlaylist) }
|
||||
items.each { |item| item.author = "" }
|
||||
items.each(&.author=(""))
|
||||
|
||||
templated "playlists"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user