JSON to client (#5553)

This commit is contained in:
Tom Moor
2024-05-24 08:29:00 -04:00
committed by GitHub
parent e1e8257df7
commit d51267b8bc
71 changed files with 651 additions and 378 deletions

View File

@@ -117,7 +117,9 @@ router.post(
pagination: { ...ctx.state.pagination, total },
data: {
notifications: await Promise.all(
notifications.map(presentNotification)
notifications.map((notification) =>
presentNotification(ctx, notification)
)
),
unseen,
},
@@ -172,7 +174,7 @@ router.post(
});
ctx.body = {
data: await presentNotification(notification),
data: await presentNotification(ctx, notification),
policies: presentPolicies(user, [notification]),
};
}