Skip to content

Commit

Permalink
fix: 학교 검색시 대안학교가 검색되지 않는 오류 수정
Browse files Browse the repository at this point in the history
- 학교 검색시 중학교만 검색하면 대안학교가 검색되지 않아 모든 학교를 조회하도록 변경했어요.
  • Loading branch information
jyj1289 committed Oct 14, 2024
1 parent e795911 commit b14b5f5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class SearchSchoolService {
private final ObjectMapper objectMapper;

public List<SchoolResponse> execute(String q) throws JsonProcessingException {
String htmlResponse = neisClient.getSchoolInfo(neisProperties.getKey(), q, "중학교");
String htmlResponse = neisClient.getSchoolInfo(neisProperties.getKey(), q);
NeisSchoolResponse response = objectMapper.readValue(htmlResponse, NeisSchoolResponse.class);

return response.getSchoolInfo().stream()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ public interface NeisClient {
@GetMapping(value = "/schoolInfo?Type=json&pSize=10")
String getSchoolInfo(
@RequestParam("Key") String key,
@RequestParam("SCHUL_NM") String schoolName,
@RequestParam(name = "SCHUL_KND_SC_NM", required = false) String schoolType
@RequestParam("SCHUL_NM") String schoolName
);
}

0 comments on commit b14b5f5

Please sign in to comment.