fix: only fetch valid alerts
This commit is contained in:
parent
442d1a749d
commit
e7a610d926
1 changed files with 1 additions and 1 deletions
|
|
@ -86,7 +86,7 @@ const getAlerts = () => {
|
||||||
const types = ['fiatBalance', 'cryptoBalance', 'error']
|
const types = ['fiatBalance', 'cryptoBalance', 'error']
|
||||||
const sql = `
|
const sql = `
|
||||||
SELECT * FROM notifications
|
SELECT * FROM notifications
|
||||||
WHERE ${WITHIN_PAST_WEEK} AND type IN ($1:list)
|
WHERE ${WITHIN_PAST_WEEK} AND valid='t' AND type IN ($1:list)
|
||||||
ORDER BY created DESC
|
ORDER BY created DESC
|
||||||
`
|
`
|
||||||
return db.any(sql, [types]).catch(logger.error)
|
return db.any(sql, [types]).catch(logger.error)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue