Clyde/frontend/src/rest/requests.js
LeoMoulin 9a5115f7fe
All checks were successful
Build and test backend / Build-backend (pull_request) Successful in 1m23s
Build and test FrontEnd / Build-frontend (pull_request) Successful in 25s
Final commit of the extension
2024-04-21 18:24:58 +02:00

85 lines
2.2 KiB
JavaScript

import {restGet, restPatch, restPost} from "@/rest/restConsumer.js";
export async function createExemptionsRequest(exempReq){
return restPost("/exemptionreq", exempReq)
}
export async function createScholarshipRequest(reqInfo){
return restPost("/scholarshipreq", reqInfo)
}
export async function getAllScholarShipsRequest(){
return restGet("/scholarshipreq")
}
export async function getAllExemptionsRequest(){
return restGet("/exemptionsreq")
}
export async function editEquivalenceState(id, newstate){
return restPatch("/request/registerequiv/"+id+"/"+newstate)
}
export async function addUninscReq(userId, reason, curriculumId){
return restPost("/unregister", {"userId" : userId, "reason" : reason, "curriculumId":curriculumId})
}
export async function editScholarshipReq(body){
return restPatch("/scholarshipreq/", body)
}
export async function getScholarshipReqById(id){
return restGet("/scholarshipreq/"+id)
}
export async function getAllUnregisters(){
return restGet("/unregister")
}
export async function getUnregisterbyId(id){
return restGet("/unregister/"+id)
}
export async function editUnregReq(id, newstate){
return restPatch("/unregister/"+id+"/"+newstate)
}
export async function getAllPayments(){
return restGet("/payment")
}
export async function postChangeCurrReq(item){
return restPost("/changecurriculumreq", item)
}
export async function getAllChangeCurrReq(){
return restGet("/changecurriculumreq")
}
export async function getChangeCurrReqById(id){
return restGet("/changecurriculumreq/"+id)
}
export async function editChangeCurrReq(id, newState){
return restPatch("/changecurriculumreq/"+id+"/"+newState)
}
export async function editChangeCurrReqTeacherState(id, newState){
return restPatch("/changecurriculumreqteacher/"+id+"/"+newState)
}
export async function getExempReq(id){
return restGet("/exemptionsreq/"+id)
}
export async function editExempReqState(id, newstate){
return restPatch("/exemptionsreq/"+id+"/"+newstate)
}
export async function getExempByUser(userId){
return restGet("/exemptionreq/"+userId)
}
export async function imposeCurriculum(id, cursusid){
return restPatch("/request/registerequivimpose/"+id+"/"+cursusid)
}