Added notification clear, improved notification styling.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
const { addAlert, removeAlert } = require('../alerts');
|
||||
const { addAlert, removeAlert, updateNotifications, updateNotification } = require('../alerts');
|
||||
|
||||
async function addAlertApi(req, res) {
|
||||
const alertId = await addAlert(req.body, req.session.user);
|
||||
@@ -14,7 +14,21 @@ async function removeAlertApi(req, res) {
|
||||
res.status(204).send();
|
||||
}
|
||||
|
||||
async function updateNotificationsApi(req, res) {
|
||||
await updateNotifications(req.body, req.session.user);
|
||||
|
||||
res.status(204).send();
|
||||
}
|
||||
|
||||
async function updateNotificationApi(req, res) {
|
||||
await updateNotification(req.params.notificationId, req.body, req.session.user);
|
||||
|
||||
res.status(204).send();
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
addAlert: addAlertApi,
|
||||
removeAlert: removeAlertApi,
|
||||
updateNotifications: updateNotificationsApi,
|
||||
updateNotification: updateNotificationApi,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user