Skip to content

Commit

Permalink
[hotfix] fix to send 200 when given blank as parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
Parkjyun committed Jan 19, 2024
1 parent 140f327 commit fb62979
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 fb62979

Please sign in to comment.