Skip to content

Commit

Permalink
Merge pull request #183 from mash-up-kr/fix/#182-place-put-api
Browse files Browse the repository at this point in the history
fix: 장소 수정 API 이슈 대응
  • Loading branch information
K-Diger authored Aug 28, 2024
2 parents 341ac6b + b16f50a commit a17c1f9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ data class ModifyPlaceRequest(
@field:Schema(description = "일정 ID", example = "1")
val scheduleId: Long,
@field:NotNull(message = "일정 타입은 필수입니다.")
@field:Schema(description = "일정 타입", example = "MEAL")
@field:Schema(description = "일정 타입", example = "DISH")
val scheduleType: ScheduleType,
@field:NotBlank(message = "장소 이름은 필수이며 빈 문자열이 허용되지 않습니다.")
@field:Size(max = 255, message = "장소 이름은 255자를 초과할 수 없습니다.")
Expand All @@ -99,7 +99,7 @@ data class ModifyPlaceRequest(
@field:Size(max = 255, message = "URL은 255자를 초과할 수 없습니다.")
@field:Schema(description = "장소 URL", example = "https://example.com")
val url: String?,
@field:Schema(description = "삭제할 이미지 URL 리스트", example = "https://example.com, https://example.com")
@field:Schema(description = "삭제할 이미지 URL 리스트", example = "[\"https://example.com\", \"https://example.com\"]")
val deleteTargetUrls: List<String>,
@field:NotNull(message = "주소는 필수입니다.")
@field:Size(max = 255, message = "주소는 255자를 초과할 수 없습니다.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,16 @@ class PlaceApi(
return ResponseForm(placeUseCase.addPlace(UuidTypeId(roomUid), addPlaceRequest, placeImageUrls))
}

@ResponseStatus(HttpStatus.OK)
@GetMapping
override fun retrieveAll(
@NotNull @PathVariable roomUid: UUID,
): ResponseForm<List<ScheduleTypeGroupResponse>> {
return ResponseForm(placeUseCase.findAllByRoomUidGroupByPlaceType(UuidTypeId(roomUid)))
}

@PatchMapping("/{placeId}")
@ResponseStatus(HttpStatus.OK)
@PatchMapping("/{placeId}", consumes = [MediaType.MULTIPART_FORM_DATA_VALUE])
override fun modifyPlace(
@NotNull @PathVariable roomUid: UUID,
@NotNull @PathVariable placeId: Long,
Expand All @@ -70,6 +72,7 @@ class PlaceApi(
)
}

@ResponseStatus(HttpStatus.OK)
@DeleteMapping("/{placeId}")
override fun deletePlace(
@NotNull @PathVariable roomUid: UUID,
Expand Down

0 comments on commit a17c1f9

Please sign in to comment.