Refactor network service to use config objects for clarity
This commit is contained in:
1 parent
a8e069b820
commit
1c8376dc24
11 files changed
+325
-286
No files matched your search
@@ -55,7 +55,9 @@ const TeamPanel = () => {
|
||||
useEffect(() => {
|
||||
const fetchTeam = async () => {
|
||||
try {
|
||||
const response = await networkService.getAllUsers(authToken);
|
||||
const response = await networkService.getAllUsers({
|
||||
authToken: authToken,
|
||||
});
|
||||
setMembers(response.data.data);
|
||||
} catch (error) {
|
||||
createToast({
|
||||
@@ -187,11 +189,11 @@ const TeamPanel = () => {
|
||||
}
|
||||
|
||||
try {
|
||||
await networkService.requestInvitationToken(
|
||||
authToken,
|
||||
toInvite.email,
|
||||
toInvite.role
|
||||
);
|
||||
await networkService.requestInvitationToken({
|
||||
authToken: authToken,
|
||||
email: toInvite.email,
|
||||
role: toInvite.role,
|
||||
});
|
||||
closeInviteModal();
|
||||
createToast({
|
||||
body: "Member invited. They will receive an email with details on how to create their account.",
|
||||
|
||||
Reference in new issue
Block a user