Fix Style/MultilineStringLiteral type of Ameba issues

This commit is contained in:
Sijawusz Pur Rahnama 2026-01-11 23:00:31 +01:00
parent ee85274b8d
commit 6b2afb23db

View File

@ -39,7 +39,7 @@ module Invidious::Search
def subscriptions(query : Query, user : Invidious::User) : Array(ChannelVideo)
view_name = "subscriptions_#{sha256(user.email)}"
return PG_DB.query_all("
return PG_DB.query_all(<<-SQL, query.text, (query.page - 1) * 20, as: ChannelVideo)
SELECT id,title,published,updated,ucid,author,length_seconds
FROM (
SELECT *,
@ -47,10 +47,8 @@ module Invidious::Search
to_tsvector(#{view_name}.author)
as document
FROM #{view_name}
) v_search WHERE v_search.document @@ plainto_tsquery($1) LIMIT 20 OFFSET $2;",
query.text, (query.page - 1) * 20,
as: ChannelVideo
)
) v_search WHERE v_search.document @@ plainto_tsquery($1) LIMIT 20 OFFSET $2;
SQL
end
end
end