Adding set for secretary and correcting self
All checks were successful
Build and test backend / Build-backend (pull_request) Successful in 2m2s
Build and test backend / Test-backend (pull_request) Successful in 1m57s
Build and test FrontEnd / Build-frontend (pull_request) Successful in 24s

This commit is contained in:
Debucquoy Anthony 2024-03-11 09:21:36 +01:00
parent d584c119ef
commit 4148d76959
Signed by: tonitch
GPG Key ID: A78D6421F083D42E

View File

@ -18,6 +18,25 @@ export async function getUser(id){
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
*/
@ -46,5 +65,5 @@ export async function getSelf(){
* - Adress
*/
export async function alterSelf(data){
return restPatch({data});
return restPatch("/user", data);
}