Compare commits
No commits in common. "eae3fe215457448c591a372b287f65e0433eef20" and "0be7eab6967a043f503aa9fce3b68dac3e76e12d" have entirely different histories.
eae3fe2154
...
0be7eab696
@ -4,6 +4,5 @@ public enum Role {
|
|||||||
Teacher,
|
Teacher,
|
||||||
Student,
|
Student,
|
||||||
Admin,
|
Admin,
|
||||||
InscriptionService,
|
|
||||||
Secretary;
|
Secretary;
|
||||||
}
|
}
|
||||||
|
@ -18,3 +18,8 @@ var dev = tasks.register<NpmTask>("dev") {
|
|||||||
tasks.register<NpmTask>("run") {
|
tasks.register<NpmTask>("run") {
|
||||||
dependsOn(dev)
|
dependsOn(dev)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.register<NpmTask>("test") {
|
||||||
|
dependsOn(tasks.npmInstall)
|
||||||
|
args.set(listOf("run", "test:unit"))
|
||||||
|
}
|
||||||
|
@ -18,25 +18,6 @@ export async function getUser(id){
|
|||||||
return restGet(endpoint);
|
return restGet(endpoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Alterable datas of user.
|
|
||||||
* usage by secretary
|
|
||||||
*
|
|
||||||
* @param id regno of the user
|
|
||||||
* @param data data to change
|
|
||||||
*
|
|
||||||
* - lastName
|
|
||||||
* - firstName
|
|
||||||
* - birthDate
|
|
||||||
* - role
|
|
||||||
* - email
|
|
||||||
* - photo
|
|
||||||
* - Adress
|
|
||||||
*/
|
|
||||||
export async function alterUser(id, data){
|
|
||||||
return restPatch("/user/" + id, data);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reserved for secretary roles. Allow to list all user on the plateform
|
* Reserved for secretary roles. Allow to list all user on the plateform
|
||||||
*/
|
*/
|
||||||
@ -44,27 +25,3 @@ export async function getAllUsers(){
|
|||||||
return restGet("/users");
|
return restGet("/users");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get informations about yourself
|
|
||||||
* - RegNo
|
|
||||||
* - FirstName / LastName
|
|
||||||
* - email
|
|
||||||
* - adressId (?)
|
|
||||||
* - birthDate
|
|
||||||
* - role
|
|
||||||
*/
|
|
||||||
export async function getSelf(){
|
|
||||||
return restGet("/user");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Alterable datas are
|
|
||||||
* - email
|
|
||||||
* - photo
|
|
||||||
* - Adress
|
|
||||||
* - Password
|
|
||||||
*/
|
|
||||||
export async function alterSelf(data){
|
|
||||||
return restPatch("/user", data);
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user