Adding info about self #88
@ -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
|
||||||
*/
|
*/
|
||||||
@ -46,5 +65,5 @@ export async function getSelf(){
|
|||||||
* - Adress
|
* - Adress
|
||||||
*/
|
*/
|
||||||
export async function alterSelf(data){
|
export async function alterSelf(data){
|
||||||
return restPatch({data});
|
return restPatch("/user", data);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user