Skip to content

Commit

Permalink
#3074-fixed transformer
Browse files Browse the repository at this point in the history
  • Loading branch information
caiodasilva2005 committed Dec 20, 2024
1 parent 9ce32f9 commit fd4f299
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/backend/src/transformers/announcements.transformer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,8 @@ import { userTransformer } from './user.transformer';

const announcementTransformer = (announcement: Prisma.AnnouncementGetPayload<AnnouncementQueryArgs>): Announcement => {
return {
announcementId: announcement.announcementId,
text: announcement.text,
...announcement,
usersReceived: announcement.usersReceived.map(userTransformer),
dateCreated: announcement.dateCreated,
senderName: announcement.senderName,
slackEventId: announcement.slackEventId,
slackChannelName: announcement.slackChannelName,
dateDeleted: announcement.dateDeleted ?? undefined
};
};
Expand Down

0 comments on commit fd4f299

Please sign in to comment.