Skip to content

Commit

Permalink
Merge pull request #106 from TeamPINGLE/hotfix/105
Browse files Browse the repository at this point in the history
[hotfix] 장소 검색 api 수정
  • Loading branch information
tkdwns414 authored Jan 19, 2024
2 parents 140f327 + fb62979 commit eb5632d
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

@RestController
Expand All @@ -22,6 +23,8 @@ public class OpenApiController implements OpenApi {

@GetMapping("/location")
public ApiResponse<List<LocationResponse>> getLocationInfo(@RequestParam(name = "search") String location) {
if(location.isBlank())
return ApiResponse.success(SuccessMessage.OK, new ArrayList<>());
return ApiResponse.success(SuccessMessage.OK, naverUtil.getLocationInfo(location));
}
}

0 comments on commit eb5632d

Please sign in to comment.