temp remove broken rewards notifications
This commit is contained in:
parent
91ccc80a97
commit
a474b6b94e
|
@ -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)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue