diff --git a/frontend/src/rest/Users.js b/frontend/src/rest/Users.js index cca662d..6c5f0f9 100644 --- a/frontend/src/rest/Users.js +++ b/frontend/src/rest/Users.js @@ -25,3 +25,26 @@ export async function getAllUsers(){ 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 + */ +export async function alterSelf(data){ + return restPatch({data}); +}