This commit is contained in:
Girish Ramakrishnan
2022-06-13 13:55:04 -07:00
parent b74f01bb9e
commit cac0933334
+1 -1
View File
@@ -52,7 +52,7 @@ async function update(req, res, next) {
assert.strictEqual(typeof req.notification, 'object');
assert.strictEqual(typeof req.body, 'object');
if (typeof req.body.acknowledged !== 'boolean') return next(new HttpError(400, 'acknowledged must be a booliean'));
if (typeof req.body.acknowledged !== 'boolean') return next(new HttpError(400, 'acknowledged must be a boolean'));
const [error] = await safe(notifications.update(req.notification, { acknowledged: req.body.acknowledged }));
if (error) return next(BoxError.toHttpError(error));