From fd78c6f3f742895aeda19608f6722298bbc3b005 Mon Sep 17 00:00:00 2001 From: dhyeonkim Date: Fri, 6 Sep 2024 09:53:30 +0900 Subject: [PATCH] fix: Modify Place Origin Bug --- .../kotlin/com/piikii/application/domain/place/PlaceService.kt | 1 + .../piikii/application/port/input/dto/request/PlaceRequest.kt | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/piikii-application/src/main/kotlin/com/piikii/application/domain/place/PlaceService.kt b/piikii-application/src/main/kotlin/com/piikii/application/domain/place/PlaceService.kt index 99bab14f..64db0452 100644 --- a/piikii-application/src/main/kotlin/com/piikii/application/domain/place/PlaceService.kt +++ b/piikii-application/src/main/kotlin/com/piikii/application/domain/place/PlaceService.kt @@ -88,6 +88,7 @@ class PlaceService( modifyPlaceRequest.toDomain( targetPlaceId, targetRoomUid, + place.origin, LongTypeId(modifyPlaceRequest.scheduleId), filterDuplicateUrls(updatedUrls, modifyPlaceRequest.deleteTargetUrls, place), ), diff --git a/piikii-application/src/main/kotlin/com/piikii/application/port/input/dto/request/PlaceRequest.kt b/piikii-application/src/main/kotlin/com/piikii/application/port/input/dto/request/PlaceRequest.kt index e67c68fd..6aebc2d2 100644 --- a/piikii-application/src/main/kotlin/com/piikii/application/port/input/dto/request/PlaceRequest.kt +++ b/piikii-application/src/main/kotlin/com/piikii/application/port/input/dto/request/PlaceRequest.kt @@ -134,6 +134,7 @@ data class ModifyPlaceRequest( fun toDomain( targetPlaceId: LongTypeId, roomUid: UuidTypeId, + origin: Origin, scheduleId: LongTypeId, updatedUrls: List, ): Place { @@ -147,7 +148,7 @@ data class ModifyPlaceRequest( address = address, phoneNumber = phoneNumber, starGrade = starGrade, - origin = Origin.MANUAL, + origin = origin, memo = memo, confirmed = false, reviewCount = reviewCount,