23 lines
686 B
JavaScript
23 lines
686 B
JavaScript
import { restGet, restPost, restDelete, restPatch } from './restConsumer.js'
|
|
|
|
export async function getLessonRequest(id){
|
|
return restGet('/requests/lessonRequest/' + id);
|
|
}
|
|
|
|
export async function getAllRequests(){
|
|
return restGet("/requests/lessonRequests");
|
|
}
|
|
export async function getOwnedRequests(){
|
|
return restGet("/requests/lessonRequests/owned");
|
|
}
|
|
export async function createRequest(request){
|
|
return restPost("/requests/lessonRequest", request);
|
|
}
|
|
|
|
export async function changeRequestState(id, infos){
|
|
return restPatch("/requests/lessonRequest/" + id, infos);
|
|
}
|
|
|
|
export async function deleteRequest(id){
|
|
return restDelete("/requests/lessonRequest/"+id);
|
|
} |