From b68fadc63dfcd477d6256567be2cabc4fca9d5a1 Mon Sep 17 00:00:00 2001 From: keyan Date: Mon, 25 Apr 2022 12:03:21 -0500 Subject: [PATCH] allow daily discussion to appear in recent --- api/resolvers/item.js | 2 +- api/resolvers/notifications.js | 2 -- components/notifications.js | 2 -- fragments/items.js | 1 + 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/api/resolvers/item.js b/api/resolvers/item.js index 27772fa4..bc2dc7eb 100644 --- a/api/resolvers/item.js +++ b/api/resolvers/item.js @@ -120,7 +120,7 @@ export default { items = await models.$queryRaw(` ${SELECT} FROM "Item" - WHERE "parentId" IS NULL AND created_at <= $1 AND "pinId" IS NULL + WHERE "parentId" IS NULL AND created_at <= $1 ${subClause(3)} ${activeOrMine()} ORDER BY created_at DESC diff --git a/api/resolvers/notifications.js b/api/resolvers/notifications.js index 63f4ef00..aee142a5 100644 --- a/api/resolvers/notifications.js +++ b/api/resolvers/notifications.js @@ -183,8 +183,6 @@ export default { await models.user.update({ where: { id: me.id }, data: { checkedNotesAt: new Date() } }) } - console.log(decodedCursor) - return { lastChecked: checkedNotesAt, earn, diff --git a/components/notifications.js b/components/notifications.js index f91c6290..b4804721 100644 --- a/components/notifications.js +++ b/components/notifications.js @@ -113,8 +113,6 @@ function Notification ({ n }) { export default function Notifications ({ notifications, earn, cursor, lastChecked, variables }) { const { data, fetchMore } = useQuery(NOTIFICATIONS, { variables }) - console.log(data) - if (data) { ({ notifications: { notifications, earn, cursor } } = data) } diff --git a/fragments/items.js b/fragments/items.js index 27ce03bb..75249373 100644 --- a/fragments/items.js +++ b/fragments/items.js @@ -52,6 +52,7 @@ export const ITEMS = gql` cursor items { ...ItemFields + position }, pins { ...ItemFields