Skip to content

Commit

Permalink
Refactor: 가게 조회시 화장실 설명 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
Kimsoo0119 committed Nov 16, 2024
1 parent e5671ad commit 748998d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/api/admin/controllers/admin-place.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,12 @@ export class AdminPlaceController {
@GetAuthorizedUser() authorizedUser: IAuthorizedUser,
@Body() updateToiletInfoDto: UpdateToiletInfoDto,
): Promise<void> {
return this.adminPlaceService.createPlaceToiletInfo(
placeId,
authorizedUser.userId,
updateToiletInfoDto,
);
console.log(updateToiletInfoDto);
// return this.adminPlaceService.createPlaceToiletInfo(
// placeId,
// authorizedUser.userId,
// updateToiletInfoDto,
// );
}

@ApiAdminPlace.CreateArea({
Expand Down
6 changes: 6 additions & 0 deletions src/api/place/dtos/response/place-detail.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ export class PlaceDetailDto implements Place {
@Expose()
y: number;

@ApiProperty({
description: '시설 설명',
})
@Expose()
description: string;

@ApiProperty({
type: [PlaceImageDto],
description: '가게 이미지',
Expand Down
5 changes: 5 additions & 0 deletions src/api/place/repository/place.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ export class PlaceRepository {
},
},
},
adminPlaceToiletRating: {
select: {
description: true,
},
},
},
});
}
Expand Down
1 change: 1 addition & 0 deletions src/api/place/services/place.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ export class PlaceService {

return plainToInstance(PlaceDetailDto, {
...selectedPlace,
description: selectedPlace.adminPlaceToiletRating?.description,
totalReviewCount,
myReview,
});
Expand Down

0 comments on commit 748998d

Please sign in to comment.