From 067d77f36d834311922904d829b74dd971741706 Mon Sep 17 00:00:00 2001 From: cabbage556 Date: Mon, 3 Apr 2023 12:46:20 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20fetchShop=20API=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - findById 서비스 로직 수정 - findOne 레포지토리 메서드 relations 수정 chore-#178 --- src/apis/shops/shops.service.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/apis/shops/shops.service.ts b/src/apis/shops/shops.service.ts index 2b2aac0..a092dcb 100644 --- a/src/apis/shops/shops.service.ts +++ b/src/apis/shops/shops.service.ts @@ -82,7 +82,13 @@ export class ShopsService { async findById({ shopId }: IShopsServiceFindById): Promise { const myShop = await this.shopsRepository.findOne({ where: { id: shopId }, - relations: ['reservation', 'image', 'review'], + relations: [ + 'reservation', + 'image', + 'review', + 'reservation.review', + 'reservation.user', + ], }); if (!myShop) {