Compare commits

..

2 Commits

Author SHA1 Message Date
8e40638b5e adding the right dependencies
Some checks failed
Build and test backend / Test-backend (push) Waiting to run
deploy to production / deploy-frontend (push) Waiting to run
deploy to production / deploy-backend (push) Waiting to run
Build and test FrontEnd / Build-frontend (push) Waiting to run
Build and test backend / Build-backend (push) Has been cancelled
2024-03-08 20:43:47 +01:00
13d9020c7d stub for cursus 2024-03-08 20:43:47 +01:00

View File

@ -0,0 +1,41 @@
/**
* cursus API
*/
import { restGet, restPostn, restDelete, restPatch } from './restConsumer.js'
/**
* Create a new cursus (bundle of courses)
* @param courses list of courses
*/
export async function createCursus(courses){
return restPost("/cursus", {courses: courses} );
}
/**
* Delete the specified cursus
*/
export async function deleteCursus(id){
return restDelete("/cursus/" + id);
}
/**
* Get informations on a particular cursus
*
* @param id identification of the cursus
*
* @return list of courses
*/
export async function getCursus(id){
return restGet("/cursus/" + id);
}
/**
* Modify the courses of a cursus
*
* @param id the id of the cursus
* @param courses list of new courses
*/
export async function alterCursus(id, courses){
return restPatch("/cursus/" + id, courses);
}