add calls to new 'me' endpoint
This commit is contained in:
parent
281a0ed4e7
commit
a797027c7e
3 changed files with 83 additions and 4 deletions
|
|
@ -3,7 +3,9 @@ import {
|
|||
getUsers,
|
||||
fetchUsers,
|
||||
fetchUserById,
|
||||
fetchPersonalInfo,
|
||||
updateUserById,
|
||||
updatePersonalInfo,
|
||||
createUser,
|
||||
deleteUser,
|
||||
clearCurrentUser,
|
||||
|
|
@ -25,6 +27,10 @@ export function useUsers() {
|
|||
return dispatch(fetchUserById(id));
|
||||
}
|
||||
|
||||
function loadPersonalInfo() {
|
||||
return dispatch(fetchPersonalInfo());
|
||||
}
|
||||
|
||||
function clearSelectedUser() {
|
||||
return dispatch(clearCurrentUser());
|
||||
}
|
||||
|
|
@ -33,6 +39,10 @@ export function useUsers() {
|
|||
return dispatch(updateUserById(data));
|
||||
}
|
||||
|
||||
function editPersonalInfo(data: any) {
|
||||
return dispatch(updatePersonalInfo(data));
|
||||
}
|
||||
|
||||
function createNewUser(data: any) {
|
||||
return dispatch(createUser(data));
|
||||
}
|
||||
|
|
@ -46,7 +56,9 @@ export function useUsers() {
|
|||
user,
|
||||
loadUser,
|
||||
loadUsers,
|
||||
loadPersonalInfo,
|
||||
editUserById,
|
||||
editPersonalInfo,
|
||||
userModalLoading,
|
||||
userTableLoading,
|
||||
createNewUser,
|
||||
|
|
|
|||
Reference in a new issue