mirror of
https://gitea.invidious.io/iv-org/invidious.git
synced 2024-08-15 00:53:41 +00:00
Format
This commit is contained in:
parent
7ca72c5b6f
commit
58f66761fb
1 changed files with 2 additions and 2 deletions
|
@ -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 a new issue