Clyde/frontend/src/rest/requests.js

53 lines
1.3 KiB
JavaScript
Raw Normal View History

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){
return restPost("/unregister", {"userId" : userId, "reason" : reason})
}
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)
}