Fix missing type check in maxStreak resolver (#2320)

This commit is contained in:
ekzyis 2025-07-24 00:41:35 +02:00 committed by GitHub
parent 6a3155fa93
commit 84ed0be86d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1133,7 +1133,8 @@ export default {
const [{ max }] = await models.$queryRaw` const [{ max }] = await models.$queryRaw`
SELECT MAX(COALESCE("endedAt"::date, (now() AT TIME ZONE 'America/Chicago')::date) - "startedAt"::date) SELECT MAX(COALESCE("endedAt"::date, (now() AT TIME ZONE 'America/Chicago')::date) - "startedAt"::date)
FROM "Streak" WHERE "userId" = ${user.id}` FROM "Streak" WHERE "userId" = ${user.id}
AND type = 'COWBOY_HAT'`
return max return max
}, },
isContributor: async (user, args, { me }) => { isContributor: async (user, args, { me }) => {