generated from nhcarrigan/template
feat: render announcements on dashboard
Some checks failed
Node.js CI / Lint and Test (pull_request) Failing after 53s
Some checks failed
Node.js CI / Lint and Test (pull_request) Failing after 53s
This commit is contained in:
@ -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.
|
||||
|
Reference in New Issue
Block a user