Added notification bell, WIP.
This commit is contained in:
@@ -2,6 +2,7 @@ import {
|
||||
fetchAlerts,
|
||||
createAlert,
|
||||
removeAlert,
|
||||
fetchNotifications,
|
||||
updateNotifications,
|
||||
updateNotification,
|
||||
} from '../alerts.js';
|
||||
@@ -24,6 +25,14 @@ export async function removeAlertApi(req, res) {
|
||||
res.status(204).send();
|
||||
}
|
||||
|
||||
export async function fetchNotificationsApi(req, res) {
|
||||
const notifications = await fetchNotifications(req.user, {
|
||||
limit: req.query.limit || 10,
|
||||
});
|
||||
|
||||
res.send(notifications);
|
||||
}
|
||||
|
||||
export async function updateNotificationsApi(req, res) {
|
||||
await updateNotifications(req.body, req.user);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user