Skip to content

Commit a3fd0a3

Browse files
committed
refactor: 사용되지 않는 api 삭제
1 parent 13759a4 commit a3fd0a3

File tree

1 file changed

+0
-38
lines changed

1 file changed

+0
-38
lines changed

src/main/java/com/example/log4u/domain/map/controller/MapController.java

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -36,44 +36,6 @@ public class MapController {
3636

3737
private final MapService mapService;
3838

39-
@Value("${naver.api.client-id}")
40-
private String clientId;
41-
42-
@Value("${naver.api.client-secret}")
43-
private String secret;
44-
45-
private final RestTemplate restTemplate;
46-
47-
@GetMapping("/location")
48-
public ResponseEntity<ReverseGeocodingResponseDto> getMyLocation(
49-
@AuthenticationPrincipal CustomOAuth2User customOAuth2User,
50-
@ModelAttribute MyLocationRequestDto request
51-
) {
52-
53-
String naverMapsUrl = UriComponentsBuilder
54-
.fromHttpUrl("https://maps.apigw.ntruss.com/map-reversegeocode/v2/gc")
55-
.queryParam("coords", request.coords())
56-
.queryParam("output", request.output())
57-
.queryParam("orders", "legalcode,admcode,addr,roadaddr")
58-
.toUriString();
59-
60-
HttpHeaders headers = new HttpHeaders();
61-
headers.set("x-ncp-apigw-api-key-id", clientId);
62-
headers.set("x-ncp-apigw-api-key", secret);
63-
64-
HttpEntity<Void> entity = new HttpEntity<>(headers);
65-
66-
ResponseEntity<ReverseGeocodingResponseDto> response = restTemplate.exchange(
67-
naverMapsUrl,
68-
HttpMethod.GET,
69-
entity,
70-
ReverseGeocodingResponseDto.class
71-
);
72-
73-
log.debug("역 지오코딩 결과 : " + String.valueOf(response) + "\n");
74-
return ResponseEntity.ok(response.getBody());
75-
}
76-
7739
@GetMapping("/diaries/cluster")
7840
public ResponseEntity<List<DiaryClusterResponseDto>> getDiaryClusters(
7941
@RequestParam double south,

0 commit comments

Comments
 (0)