allow daily discussion to appear in recent

This commit is contained in:
keyan 2022-04-25 12:03:21 -05:00
parent cef122141f
commit b68fadc63d
4 changed files with 2 additions and 5 deletions

View File

@ -120,7 +120,7 @@ export default {
items = await models.$queryRaw(` items = await models.$queryRaw(`
${SELECT} ${SELECT}
FROM "Item" FROM "Item"
WHERE "parentId" IS NULL AND created_at <= $1 AND "pinId" IS NULL WHERE "parentId" IS NULL AND created_at <= $1
${subClause(3)} ${subClause(3)}
${activeOrMine()} ${activeOrMine()}
ORDER BY created_at DESC ORDER BY created_at DESC

View File

@ -183,8 +183,6 @@ export default {
await models.user.update({ where: { id: me.id }, data: { checkedNotesAt: new Date() } }) await models.user.update({ where: { id: me.id }, data: { checkedNotesAt: new Date() } })
} }
console.log(decodedCursor)
return { return {
lastChecked: checkedNotesAt, lastChecked: checkedNotesAt,
earn, earn,

View File

@ -113,8 +113,6 @@ function Notification ({ n }) {
export default function Notifications ({ notifications, earn, cursor, lastChecked, variables }) { export default function Notifications ({ notifications, earn, cursor, lastChecked, variables }) {
const { data, fetchMore } = useQuery(NOTIFICATIONS, { variables }) const { data, fetchMore } = useQuery(NOTIFICATIONS, { variables })
console.log(data)
if (data) { if (data) {
({ notifications: { notifications, earn, cursor } } = data) ({ notifications: { notifications, earn, cursor } } = data)
} }

View File

@ -52,6 +52,7 @@ export const ITEMS = gql`
cursor cursor
items { items {
...ItemFields ...ItemFields
position
}, },
pins { pins {
...ItemFields ...ItemFields