File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -77,14 +77,13 @@ module Invidious::Database::Channels
7777
7878 def select (ids : Array (String )) : Array (InvidiousChannel )?
7979 return [] of InvidiousChannel if ids.empty?
80- values = ids.map { |id | %( ('#{id}')) }.join(" ," )
8180
8281 request = <<-SQL
8382 SELECT * FROM channels
84- WHERE id = ANY(VALUES #{ values } )
83+ WHERE id = ANY($ 1 )
8584 SQL
8685
87- return PG_DB .query_all(request, as: InvidiousChannel )
86+ return PG_DB .query_all(request, ids, as: InvidiousChannel )
8887 end
8988end
9089
@@ -127,11 +126,11 @@ module Invidious::Database::ChannelVideos
127126
128127 request = <<-SQL
129128 SELECT * FROM channel_videos
130- WHERE id IN ( #{ arg_array(ids) } )
129+ WHERE id = ANY($ 1 )
131130 ORDER BY published DESC
132131 SQL
133132
134- return PG_DB .query_all(request, args: ids, as: ChannelVideo )
133+ return PG_DB .query_all(request, ids, as: ChannelVideo )
135134 end
136135
137136 def select_notfications (ucid : String , since : Time ) : Array (ChannelVideo )
You can’t perform that action at this time.
0 commit comments