Skip to content

Commit

Permalink
More updates after code review.
Browse files Browse the repository at this point in the history
More updates after code review.
  • Loading branch information
infstar committed Nov 21, 2024
1 parent 3e4ab7a commit 4348d96
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ private School getSchool(String schoolId, String accessToken) {
private District getDistrict(String districtCode, String accessToken) {
try {
return webClient.get()
.uri(String.format(constants.getDistrictByMincodeUrl(), districtCode))
.uri(String.format(constants.getDistrictByDistrictNumberUrl(), districtCode))
.headers(h -> h.setBearerAuth(accessToken))
.retrieve()
.bodyToMono(District.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ private EducGradReportApiConstants(){}
@Value("${endpoint.grad-trax-api.school-by-school-id.url}")
private String schoolBySchoolIdUrl;

@Value("${endpoint.grad-trax-api.district-by-min-code.url}")
private String districtByMincodeUrl;
@Value("${endpoint.grad-trax-api.district-by-dist-no.url}")
private String districtByDistrictNumberUrl;

// Splunk LogHelper Enabled
@Value("${splunk.log-helper.enabled}")
Expand Down
2 changes: 1 addition & 1 deletion api/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ endpoint:
grad-trax-api:
school-by-school-id:
url: ${GRAD_TRAX_API}api/v2/trax/school-clob/%s
district-by-min-code:
district-by-dist-no:
url: ${GRAD_TRAX_API}api/v2/trax/district?distNo=%s

#Splunk LogHelper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1394,7 +1394,7 @@ public void testGetAllSchoolReportList() {
district.setDisplayName("SOOKE");

when(this.webClient.get()).thenReturn(this.requestHeadersUriMock);
when(this.requestHeadersUriMock.uri(String.format(constants.getDistrictByMincodeUrl(),district.getDistrictNumber()))).thenReturn(this.requestHeadersMock);
when(this.requestHeadersUriMock.uri(String.format(constants.getDistrictByDistrictNumberUrl(),district.getDistrictNumber()))).thenReturn(this.requestHeadersMock);
when(this.requestHeadersMock.headers(any(Consumer.class))).thenReturn(this.requestHeadersMock);
when(this.requestHeadersMock.retrieve()).thenReturn(this.responseMock);
when(this.responseMock.bodyToMono(District.class)).thenReturn(Mono.just(district));
Expand Down
2 changes: 1 addition & 1 deletion api/src/test/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ endpoint:
grad-trax-api:
school-by-school-id:
url: https://educ-grad-trax-api-77c02f-dev.apps.silver.devops.gov.bc.ca/api/v2/trax/school-clob/%s
district-by-min-code:
district-by-dist-no:
url: https://educ-grad-trax-api-77c02f-dev.apps.silver.devops.gov.bc.ca/api/v2/trax/district?distNo=%s

#Splunk LogHelper
Expand Down

0 comments on commit 4348d96

Please sign in to comment.