Skip to content

Commit

Permalink
Merge pull request #14 from 9oormthon-univ/hyundong
Browse files Browse the repository at this point in the history
fix :: 관공서 조회 요청을 쿼리 파라미터로 수정
  • Loading branch information
hyundong-L authored Nov 20, 2024
2 parents 54fabd9 + ada6ff5 commit 1d30bd6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,19 @@ public class PublicOfficeController {

@Operation(summary = "근처 관공서 반환")
@GetMapping("/nearby")
public ResponseTemplate<List<FindAroundPublicOfficeResponse>> nearbyPublicOffices(@RequestBody FindAroundPublicOfficeRequest request) {
public ResponseTemplate<List<FindAroundPublicOfficeResponse>> nearbyPublicOffices(
@RequestParam String leftBottomLongitude,
@RequestParam String leftBottomLatitude,
@RequestParam String rightTopLongitude,
@RequestParam String rightTopLatitude
) {
FindAroundPublicOfficeRequest request = FindAroundPublicOfficeRequest.builder()
.leftBottomLongitude(leftBottomLongitude)
.leftBottomLatitude(leftBottomLatitude)
.rightTopLongitude(rightTopLongitude)
.rightTopLatitude(rightTopLatitude)
.build();

return new ResponseTemplate<>(HttpStatus.OK, "근처 관공서 조회 성공", publicOfficeService.findAroundPublicOffice(request));
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package com.danpoong.onchung.domain.public_office.dto;

import lombok.Builder;

@Builder
public record FindAroundPublicOfficeRequest(
String leftBottomLongitude, //경도
String leftBottomLatitude, //위도
Expand Down

0 comments on commit 1d30bd6

Please sign in to comment.