Simple hook for when the backend is ready
This commit is contained in:
@ -93,6 +93,18 @@ export async function getAllUsers(){
|
||||
return restGet("/users");
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the list of teachers
|
||||
*
|
||||
* @return a list of teachers
|
||||
* each elements is of the form
|
||||
* - id
|
||||
* - name
|
||||
* - role
|
||||
*/
|
||||
export async function getTeachers(){
|
||||
return restGet("/users/teacher")
|
||||
}
|
||||
|
||||
/**
|
||||
* Get informations about yourself
|
||||
|
@ -34,6 +34,21 @@ export async function getCourse(id){
|
||||
return restGet("/course/" + id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the list of courses to display on secretary's option
|
||||
*
|
||||
* @return list of courses of the form
|
||||
* - id
|
||||
* - name
|
||||
* - credits
|
||||
* - facutly
|
||||
* - teacher
|
||||
* - Assistants
|
||||
*/
|
||||
export async function getCourses(){
|
||||
return restGet("/course")
|
||||
}
|
||||
|
||||
/**
|
||||
* Change the options of a course
|
||||
*
|
||||
|
Reference in New Issue
Block a user