mirror of
https://github.com/iv-org/invidious.git
synced 2024-10-01 01:25:56 -04:00
Format
This commit is contained in:
parent
7ca72c5b6f
commit
58f66761fb
@ -89,7 +89,7 @@ module Invidious::Database::Channels
|
||||
# Select channels sorted by last published video
|
||||
def select_sorted(ids : Array(String)) : Array(InvidiousChannel)?
|
||||
return [] of InvidiousChannel if ids.empty?
|
||||
|
||||
|
||||
request = <<-SQL
|
||||
WITH max_published AS (
|
||||
SELECT ucid, MAX(published) AS last_published
|
||||
@ -101,7 +101,7 @@ module Invidious::Database::Channels
|
||||
WHERE channels.id = ANY($1)
|
||||
ORDER BY max_published.last_published DESC NULLS LAST;
|
||||
SQL
|
||||
|
||||
|
||||
return PG_DB.query_all(request, ids, as: InvidiousChannel)
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user