Chore: change misleading query name
This commit is contained in:
parent
b89ba7d939
commit
2401238b2f
5 changed files with 45 additions and 28 deletions
|
|
@ -56,10 +56,9 @@ const getNotifications = () => {
|
|||
const sql = `SELECT * FROM notifications ORDER BY created DESC`
|
||||
return db.any(sql).catch(console.error)
|
||||
}
|
||||
|
||||
const markAsRead = (id) => {
|
||||
const sql = `UPDATE notifications SET read = 't' WHERE id = $1`
|
||||
return db.none(sql, [id]).catch(console.error)
|
||||
const setRead = (id, read) => {
|
||||
const sql = `UPDATE notifications SET read = $1 WHERE id = $2`
|
||||
return db.none(sql, [read, id]).catch(console.error)
|
||||
}
|
||||
|
||||
const markAllAsRead = () => {
|
||||
|
|
@ -87,7 +86,7 @@ module.exports = {
|
|||
clearBlacklistNotification,
|
||||
getValidNotifications,
|
||||
getNotifications,
|
||||
markAsRead,
|
||||
setRead,
|
||||
markAllAsRead,
|
||||
hasUnreadNotifications,
|
||||
getAlerts,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue