link backend Post Patch Delete Lesson

This commit is contained in:
2024-04-16 22:03:48 +02:00
parent 9112004326
commit a2be04bfb3
17 changed files with 282 additions and 79 deletions

View File

@ -1,4 +1,4 @@
import {restGet,restPost,restPatch} from "@/rest/restConsumer.js";
import {restGet, restPost, restPatch, restDelete, restDeleteItem} from "@/rest/restConsumer.js";
export async function getAllSchedule(){
return restGet('/schedules');
@ -19,3 +19,12 @@ export async function getCurriculumSchedule(id){
export async function addLessonToSchedule(id,lessonId){
return restPost('/schedule/' + id, lessonId)
}
export async function getSchedule(id){
return restGet('/schedule/' + id);
}
export async function deleteLessonFromSchedule(id,lessonId){
return restDeleteItem('/schedule/lesson/'+ id, lessonId)
}