Compare commits
No commits in common. "8e40638b5e85e439f207a3cc2a676ecb9c8829d7" and "875cfb8b7cf469756e22a0b9fb5c1d8060a7b69b" have entirely different histories.
8e40638b5e
...
875cfb8b7c
@ -1,41 +0,0 @@
|
||||
/**
|
||||
* 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);
|
||||
}
|
Loading…
Reference in New Issue
Block a user