Skip to content

Commit

Permalink
reflect code review
Browse files Browse the repository at this point in the history
  • Loading branch information
siwonpada committed Nov 7, 2024
1 parent b004700 commit 9dc4b10
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/fcm/fcm.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,18 @@ export class FcmRepository {

async createLogs(content: Content, fcmTokenIds: string[]): Promise<void> {
const jsonContent = content as unknown as Prisma.JsonObject;
await this.prismaService.log.createMany({
data: fcmTokenIds.map((fcmTokenId) => ({
fcmTokenId,
content: jsonContent,
})),
});
await this.prismaService.log
.createMany({
data: fcmTokenIds.map((fcmTokenId) => ({
fcmTokenId,
content: jsonContent,
})),
})
.catch((err) => {
this.logger.error('createLogs');
this.logger.debug(err);
throw new InternalServerErrorException('Database error');
});
return;
}

Expand Down

0 comments on commit 9dc4b10

Please sign in to comment.