1
0
forked from PGL/Clyde
Clyde/frontend/src/rest/scheduleRest.js
2024-04-14 13:52:09 +02:00

22 lines
537 B
JavaScript

import {restGet,restPost,restPatch} from "@/rest/restConsumer.js";
export async function getAllSchedule(){
return restGet('/schedules');
}
export async function getOwnSchedule(){
return restGet('/schedule')
}
export async function createSchedule(curriculum) {
return restPost('/schedule',{curriculum : curriculum})
}
export async function getCurriculumSchedule(id){
return restGet('/schedule/curriculum/' + id)
}
export async function addLessonToSchedule(id,lessonId){
return restPost('/schedule/' + id, lessonId)
}