Fix and simplifie the post and get for externalCurriculum

This commit is contained in:
2024-04-10 23:09:38 +02:00
parent 0c04bed799
commit 706481ed1a
5 changed files with 56 additions and 8 deletions

View File

@ -1,4 +1,5 @@
import {restGet, restPost} from "@/rest/restConsumer.js";
import {parseInteger} from "jsdom/lib/jsdom/living/helpers/strings.js";
export async function createExternalCurriculum(inscriptionRequestId,school, formation, completion, startYear, endYear, justifdocUrl){
return restPost("/externalcurriculum", {
@ -6,12 +7,12 @@ export async function createExternalCurriculum(inscriptionRequestId,school, form
school:school,
formation :formation,
completion : completion,
startYear : startYear,
endYear: endYear,
startYear : parseInteger(startYear),
endYear: parseInteger(endYear),
justifdocUrl : justifdocUrl
})
}
export async function getExternalCurriculumListByInscrReq(inscriptionRequestId){
return restGet("/externalCurriculum/"+parseInt(inscriptionRequestId))
}
export async function getExternalCurriculumByInscrReq(inscrReqId){
return restGet("/externalcurriculum/"+inscrReqId);
}