Skip to content

Commit

Permalink
✨ 모각코 게시물 생성 시 참석자 테이블과 연결
Browse files Browse the repository at this point in the history
  • Loading branch information
ldhbenecia committed Nov 22, 2023
1 parent e183108 commit ec68fa2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/backend/src/mogaco/mogaco.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@ export class MogacoRepository {
},
});

await this.prisma.participant.create({
data: {
postId: mogaco.id,
userId: Number(member.id),
},
});

return mogaco;
} catch (error) {
throw new Error(`Failed to create Mogaco: ${error.message}`);
Expand Down

0 comments on commit ec68fa2

Please sign in to comment.