temp remove broken rewards notifications

This commit is contained in:
keyan 2023-10-06 19:28:05 -05:00
parent 91ccc80a97
commit a474b6b94e
1 changed files with 6 additions and 6 deletions

View File

@ -1,7 +1,7 @@
import serialize from '../api/resolvers/serial.js' import serialize from '../api/resolvers/serial.js'
import { sendUserNotification } from '../api/webPush/index.js' // import { sendUserNotification } from '../api/webPush/index.js'
import { ANON_USER_ID } from '../lib/constants.js' import { ANON_USER_ID } from '../lib/constants.js'
import { msatsToSats, numWithUnits } from '../lib/format.js' // import { msatsToSats, numWithUnits } from '../lib/format.js'
const ITEM_EACH_REWARD = 4.0 const ITEM_EACH_REWARD = 4.0
const UPVOTE_EACH_REWARD = 4.0 const UPVOTE_EACH_REWARD = 4.0
@ -162,10 +162,10 @@ export function earn ({ models }) {
await serialize(models, await serialize(models,
models.$executeRaw`SELECT earn(${earner.userId}::INTEGER, ${earnings}, models.$executeRaw`SELECT earn(${earner.userId}::INTEGER, ${earnings},
${now}::timestamp without time zone, ${earner.type}::"EarnType", ${earner.id}::INTEGER, ${earner.rank}::INTEGER)`) ${now}::timestamp without time zone, ${earner.type}::"EarnType", ${earner.id}::INTEGER, ${earner.rank}::INTEGER)`)
sendUserNotification(earner.userId, { // sendUserNotification(earner.userId, {
title: `you stacked ${numWithUnits(msatsToSats(earnings), { abbreviate: false })} in rewards`, // title: `you stacked ${numWithUnits(msatsToSats(earnings), { abbreviate: false })} in rewards`,
tag: 'EARN' // tag: 'EARN'
}).catch(console.error) // }).catch(console.error)
} }
}) })