|
|
@@ -43,13 +43,12 @@ module.exports = (crowi) => {
|
|
|
}
|
|
|
});
|
|
|
|
|
|
- router.post('/read', accessTokenParser, loginRequiredStrictly, csrf, (req, res) => {
|
|
|
+ router.post('/read', accessTokenParser, loginRequiredStrictly, csrf, async(req, res) => {
|
|
|
const user = req.user;
|
|
|
|
|
|
try {
|
|
|
- const notification = InAppNotification.read(user);
|
|
|
- const result = { notification };
|
|
|
- return res.apiv3(result);
|
|
|
+ await inAppNotificationService.read(user);
|
|
|
+ return res.apiv3();
|
|
|
}
|
|
|
catch (err) {
|
|
|
return res.apiv3Err(err);
|