From 588f9b9bd68c1bde28324918f6123d4b5254213c Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Wed, 21 Nov 2018 08:25:21 -0600 Subject: [PATCH] Fix 'order' expression --- src/invidious.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/invidious.cr b/src/invidious.cr index b08cbc9e..520e4ebf 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -1680,7 +1680,7 @@ get "/feed/subscriptions" do |env| user.watched, as: ChannelVideo) else videos = PG_DB.query_all("SELECT DISTINCT ON (ucid) * FROM #{view_name} \ - ORDER BY published, ucid #{sort}", as: ChannelVideo) + ORDER BY ucid, published #{sort}", as: ChannelVideo) end videos.sort_by! { |video| video.published }.reverse!