Adding info about self (#88)
All checks were successful
Build and test backend / Build-backend (push) Successful in 2m13s
deploy to production / deploy-backend (push) Successful in 2m24s
Build and test FrontEnd / Build-frontend (push) Successful in 25s
Build and test backend / Test-backend (push) Successful in 1m21s
deploy to production / deploy-frontend (push) Successful in 27s
All checks were successful
Build and test backend / Build-backend (push) Successful in 2m13s
deploy to production / deploy-backend (push) Successful in 2m24s
Build and test FrontEnd / Build-frontend (push) Successful in 25s
Build and test backend / Test-backend (push) Successful in 1m21s
deploy to production / deploy-frontend (push) Successful in 27s
Reviewed-on: #88 Reviewed-by: Wal <karpinskiwal@gmail.com> Reviewed-by: Maxime <231026@umons.ac.be> Reviewed-by: LeoMoulin <leomoulin125@gmail.com> Co-authored-by: Anthony Debucquoy <debucquoy.anthony@gmail.com> Co-committed-by: Anthony Debucquoy <debucquoy.anthony@gmail.com>
This commit is contained in:
parent
86f1a6f17b
commit
f52cb31189
@ -18,6 +18,25 @@ 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
|
||||||
*/
|
*/
|
||||||
@ -25,3 +44,27 @@ 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