summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOmar Roth <omarroth@hotmail.com>2018-11-21 08:25:21 -0600
committerOmar Roth <omarroth@hotmail.com>2018-11-21 08:25:21 -0600
commit588f9b9bd68c1bde28324918f6123d4b5254213c (patch)
tree11c86e96ff0f98d5390c0098e2ecdf02e5dfd98f
parentd6d73bd33630add1ff0d114fd468685ce88c3795 (diff)
downloadinvidious-588f9b9bd68c1bde28324918f6123d4b5254213c.tar.gz
invidious-588f9b9bd68c1bde28324918f6123d4b5254213c.tar.bz2
invidious-588f9b9bd68c1bde28324918f6123d4b5254213c.zip
Fix 'order' expression
-rw-r--r--src/invidious.cr2
1 files changed, 1 insertions, 1 deletions
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!