1
0
forked from PGL/Clyde

Add course to a curriculum when created

This commit is contained in:
2024-04-21 19:55:39 +02:00
parent ca10084400
commit 05ed28626a
5 changed files with 34 additions and 22 deletions

View File

@ -7,8 +7,8 @@ import { restGet, restPost, restDelete, restPatch } from './restConsumer.js'
/**
* Create a new course
*/
export async function createCourse(name, credits, owner){
return restPost("/course", {title: name, credits: credits, owner} )
export async function createCourse(id,name, credits, owner){
return restPost("/course/curriculum/" + id, {title: name, credits: credits, owner} )
}
/**
@ -19,7 +19,7 @@ export async function deleteCourse(id){
}
/**
* Get informations on a particular course
* Get information on a particular course
*
* @param id identification of the course
*