From 12d1259828a5bf4986e6c731d965a99013361d25 Mon Sep 17 00:00:00 2001 From: Jung SongYi Date: Mon, 7 Jun 2021 23:09:11 +0900 Subject: [PATCH] Add #221 stacks data to response in registerComment and deleteComment --- controllers/recruit/deleteComment.ts | 2 +- controllers/recruit/registerComment.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/controllers/recruit/deleteComment.ts b/controllers/recruit/deleteComment.ts index 71a4ad3..4822774 100644 --- a/controllers/recruit/deleteComment.ts +++ b/controllers/recruit/deleteComment.ts @@ -12,7 +12,7 @@ const deleteComment = async (req: Request, res: Response) => { let boardInfo; try { boardInfo = await getRepository(Recruits).findOne({ - relations: ['writer'], + relations: ['writer', 'stacks'], where: { id: boardId, }, diff --git a/controllers/recruit/registerComment.ts b/controllers/recruit/registerComment.ts index 96faacc..8450671 100644 --- a/controllers/recruit/registerComment.ts +++ b/controllers/recruit/registerComment.ts @@ -18,7 +18,7 @@ const registerComment = async (req: Request, res: Response) => { }); if (foundUser) { const foundBoard = await getRepository(Recruits).findOne({ - relations: ['writer'], + relations: ['writer', 'stacks'], where: { id: boardId, },