Skip to content

Commit

Permalink
Feat: Edit place response dto
Browse files Browse the repository at this point in the history
- place 상세 조회시, categoryIconCode 필드 추가
  • Loading branch information
sally0226 committed Jul 31, 2024
1 parent a96a9d7 commit fff20c4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/place/dto/place-for-map-response.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ export class KakaoPlaceResponseDto implements Partial<KakaoPlace> {
@ApiProperty({ type: OffDay, isArray: true })
offDayList: OffDay[];

@ApiProperty()
categoryIconCode: number;

constructor(kakaoPlace: KakaoPlace) {
this.kakaoId = kakaoPlace.id;
this.isRegisteredPlace = false;
Expand All @@ -116,6 +119,7 @@ export class KakaoPlaceResponseDto implements Partial<KakaoPlace> {
this.blogReviewCnt = kakaoPlace.blogReviewCnt;
this.openTimeList = kakaoPlace.openTimeList;
this.offDayList = kakaoPlace.offDayList;
this.categoryIconCode = kakaoPlace.categoryIconCode;
}
}

Expand Down Expand Up @@ -183,6 +187,9 @@ export class PlaceResponseDto implements KakaoPlaceResponseDto {
@ApiProperty({ type: OffDay, isArray: true })
offDayList: OffDay[];

@ApiProperty()
categoryIconCode: number;

@ApiProperty()
createdAt: Date;

Expand Down Expand Up @@ -215,6 +222,7 @@ export class PlaceResponseDto implements KakaoPlaceResponseDto {
this.offDayList = kakaoPlace.offDayList;
this.createdAt = placeForMap.createdAt;
this.updatedAt = placeForMap.updatedAt;
this.categoryIconCode = kakaoPlace.categoryIconCode;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/place/place.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export class PlaceController {
async getPlaceByKakaoId(
@Param('mapId') mapId: string,
@Param('kakaoPlaceId') kakaoPlaceId: number,
) {
): Promise<KakaoPlaceResponseDto> {
return await this.placeService.getPlaceByKakaoId(mapId, kakaoPlaceId);
}

Expand Down

0 comments on commit fff20c4

Please sign in to comment.