feat: render announcements on dashboard
Some checks failed
Node.js CI / Lint and Test (pull_request) Failing after 53s

This commit is contained in:
2025-07-05 19:09:05 -07:00
parent 4ca9042bcd
commit 9842f49fec
14 changed files with 1372 additions and 8 deletions

View File

@ -28,7 +28,14 @@ export const announcementRoutes: FastifyPluginAsync = async(server) => {
take: 10,
});
return await reply.status(200).type("application/json").
send(announcements);
send(announcements.map((announcement) => {
return {
content: announcement.content,
createdAt: announcement.createdAt,
title: announcement.title,
type: announcement.type,
};
}));
});
// eslint-disable-next-line @typescript-eslint/naming-convention -- Fastify requires Body instead of body.