Skip to content

Commit c0f26b2

Browse files
committed
refactor: 지도 API 컨트롤러를 geohash 기반 요청 방식에 맞게 수정
1 parent 1270a7f commit c0f26b2

File tree

1 file changed

+6
-14
lines changed

1 file changed

+6
-14
lines changed

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

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,25 +37,17 @@ public class MapController {
3737
private final MapService mapService;
3838

3939
@GetMapping("/diaries/cluster")
40-
public ResponseEntity<List<DiaryClusterResponseDto>> getDiaryClusters(
41-
@RequestParam double south,
42-
@RequestParam double north,
43-
@RequestParam double west,
44-
@RequestParam double east,
45-
@RequestParam int zoom
40+
public ResponseEntity<List<DiaryClusterResponseDto>> getDiaryClustersByGeohash(
41+
@RequestParam String geohash,
42+
@RequestParam int level
4643
) {
47-
List<DiaryClusterResponseDto> clusters = mapService.getDiaryClusters(south, north, west, east, zoom);
44+
List<DiaryClusterResponseDto> clusters = mapService.getDiaryClusters(geohash, level);
4845
return ResponseEntity.ok(clusters);
4946
}
5047

5148
@GetMapping("/diaries/marker")
52-
public ResponseEntity<List<DiaryMarkerResponseDto>> getDiariesInBounds(
53-
@RequestParam double south,
54-
@RequestParam double north,
55-
@RequestParam double west,
56-
@RequestParam double east
57-
) {
58-
List<DiaryMarkerResponseDto> diaries = mapService.getDiariesInBounds(south, north, west, east);
49+
public ResponseEntity<List<DiaryMarkerResponseDto>> getDiariesByGeohash(@RequestParam String geohash) {
50+
List<DiaryMarkerResponseDto> diaries = mapService.getDiariesByGeohash(geohash);
5951
return ResponseEntity.ok(diaries);
6052
}
6153
}

0 commit comments

Comments
 (0)