From 75a8ca2163ec8c379c0b8227f928f024bcd45269 Mon Sep 17 00:00:00 2001 From: keyan Date: Wed, 6 Oct 2021 20:45:38 -0700 Subject: [PATCH] fix notification subsorts to desc --- api/resolvers/notifications.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/resolvers/notifications.js b/api/resolvers/notifications.js index 663ae48f..683a6bf3 100644 --- a/api/resolvers/notifications.js +++ b/api/resolvers/notifications.js @@ -52,7 +52,7 @@ export default { JOIN "Item" p ON "Item"."parentId" = p.id WHERE p."userId" = $1 AND "Item"."userId" <> $1 AND "Item".created_at <= $2 - ORDER BY "Item".created_at + ORDER BY "Item".created_at desc LIMIT ${LIMIT}+$3) UNION ALL (SELECT ${ITEM_SUBQUERY_FIELDS}, max(subquery.voted_at) as "sortTime", @@ -80,7 +80,7 @@ export default { AND "Mention".created_at <= $2 AND "Item"."userId" <> $1 AND (p."userId" IS NULL OR p."userId" <> $1) - ORDER BY "Mention".created_at + ORDER BY "Mention".created_at desc LIMIT ${LIMIT}+$3) ORDER BY "sortTime" DESC OFFSET $3