fix referrals showing in meRewards

This commit is contained in:
keyan 2024-07-19 12:38:49 -05:00
parent 573d4d8452
commit c025c85855
1 changed files with 1 additions and 0 deletions

View File

@ -141,6 +141,7 @@ export default {
(SELECT FLOOR("Earn".msats / 1000.0) as sats, type, rank, "typeId" (SELECT FLOOR("Earn".msats / 1000.0) as sats, type, rank, "typeId"
FROM "Earn" FROM "Earn"
WHERE "Earn"."userId" = ${me.id} WHERE "Earn"."userId" = ${me.id}
AND (type IS NULL OR type NOT IN ('FOREVER_REFERRAL', 'ONE_DAY_REFERRAL'))
AND date_trunc('day', "Earn".created_at AT TIME ZONE 'UTC' AT TIME ZONE 'America/Chicago') = days_cte.day AND date_trunc('day', "Earn".created_at AT TIME ZONE 'UTC' AT TIME ZONE 'America/Chicago') = days_cte.day
ORDER BY "Earn".msats DESC) ORDER BY "Earn".msats DESC)
) "Earn" ) "Earn"