Skip to content

Commit

Permalink
Merge pull request #327 from bcgov/grad-release
Browse files Browse the repository at this point in the history
Grad release 1.17.0
  • Loading branch information
githubmamatha authored Apr 8, 2024
2 parents 3dd2c0e + 4813ebb commit 0eaeb1d
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>ca.bc.gov.educ</groupId>
<artifactId>educ-grad-data-conversion-api</artifactId>
<version>1.8.55</version>
<version>1.8.56</version>
<name>educ-grad-data-conversion-api</name>
<description>Ministry of Education GRAD DATA CONVERSION API</description>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Delete All student related data ({STUDENT_API}/api/v1/student/conv/studentid/{st
Update TRAX_STUDENT_NO status to NULL
*/
try {
restUtils.updateTraxStudentNo(new TraxStudentNo(pen, null, null), accessToken);
restUtils.deleteTraxStudentNo(new TraxStudentNo(pen, null, null), accessToken);
} catch (Exception e) {
logger.info("Exception thrown when trying to update TraxStudentNo.");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,9 @@ public class EducGradDataConversionApiConstants {
@Value("${endpoint.grad-trax-api.student.save-trax-student-no.url}")
private String saveTraxStudentNoUrl;

@Value("${endpoint.grad-trax-api.student.delete-trax-student-no.url}")
private String deleteTraxStudentNoUrl;

@Value("${endpoint.grad-graduation-report-api.delete-student-achievements.url}")
private String deleteStudentAchievementsUrl;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -360,14 +360,13 @@ public TraxStudentNo saveTraxStudentNo(TraxStudentNo traxStudentNo, String acces
.retrieve().bodyToMono(TraxStudentNo.class).block();
}

public TraxStudentNo updateTraxStudentNo(TraxStudentNo traxStudentNo, String accessToken) {
return webClient.put()
.uri(constants.getSaveTraxStudentNoUrl())
public TraxStudentNo deleteTraxStudentNo(TraxStudentNo traxStudentNo, String accessToken) {
return webClient.delete()
.uri(String.format(constants.getDeleteTraxStudentNoUrl(),traxStudentNo))
.headers(h -> {
h.setBearerAuth(accessToken);
h.set(EducGradDataConversionApiConstants.CORRELATION_ID, ThreadLocalStateUtil.getCorrelationID());
})
.body(BodyInserters.fromValue(traxStudentNo))
.retrieve().bodyToMono(TraxStudentNo.class).block();
}

Expand Down
2 changes: 2 additions & 0 deletions api/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,8 @@ endpoint:
url: ${GRAD_TRAX_API}api/v1/trax/common/student-master
save-trax-student-no:
url: ${GRAD_TRAX_API}api/v1/trax/common/trax-student-no
delete-trax-student-no:
url: ${GRAD_TRAX_API}api/v1/trax/common/trax-student-no/%s
course:
get-course-restrictions:
url: ${GRAD_TRAX_API}api/v1/trax/common/course-restrictions
Expand Down
2 changes: 2 additions & 0 deletions api/src/test/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ endpoint:
url: https://educ-grad-trax-api-77c02f-dev.apps.silver.devops.gov.bc.ca/api/v1/trax/common/student-master
save-trax-student-no:
url: https://educ-grad-trax-api-77c02f-dev.apps.silver.devops.gov.bc.ca/api/v1/trax/common/trax-student-no
delete-trax-student-no:
url: https://educ-grad-trax-api-77c02f-dev.apps.silver.devops.gov.bc.ca/api/v1/trax/common/trax-student-no/%s
course:
get-course-restrictions:
url: https://educ-grad-trax-api-77c02f-dev.apps.silver.devops.gov.bc.ca/api/v1/trax/common/course-restrictions
Expand Down

0 comments on commit 0eaeb1d

Please sign in to comment.