mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-09 00:18:00 +01:00
refactor: bubble promise instead of return await (#4906)
Tiny refactor that bubbles promises instead of using `return await`. Should be more consistent with the rest of the changes in https://github.com/Unleash/unleash/pull/4903
This commit is contained in:
parent
4167a60588
commit
280e21f073
@ -25,7 +25,7 @@ const useAddonsApi = () => {
|
||||
method: 'DELETE',
|
||||
});
|
||||
|
||||
return await makeRequest(req.caller, req.id);
|
||||
return makeRequest(req.caller, req.id);
|
||||
};
|
||||
|
||||
const updateAddon = useCallback(
|
||||
|
@ -20,7 +20,7 @@ export const useInviteTokenApi = () => {
|
||||
body: JSON.stringify(request),
|
||||
});
|
||||
|
||||
return await makeRequest(req.caller, req.id);
|
||||
return makeRequest(req.caller, req.id);
|
||||
},
|
||||
[createRequest, makeRequest],
|
||||
);
|
||||
@ -37,7 +37,7 @@ export const useInviteTokenApi = () => {
|
||||
}),
|
||||
});
|
||||
|
||||
return await makeRequest(req.caller, req.id);
|
||||
return makeRequest(req.caller, req.id);
|
||||
},
|
||||
[createRequest, makeRequest],
|
||||
);
|
||||
@ -49,7 +49,7 @@ export const useInviteTokenApi = () => {
|
||||
body: JSON.stringify(value),
|
||||
});
|
||||
|
||||
return await makeRequest(req.caller, req.id);
|
||||
return makeRequest(req.caller, req.id);
|
||||
},
|
||||
[createRequest, makeRequest],
|
||||
);
|
||||
|
@ -24,7 +24,7 @@ export const useRolesApi = () => {
|
||||
);
|
||||
|
||||
const response = await makeRequest(req.caller, req.id);
|
||||
return await response.json();
|
||||
return response.json();
|
||||
};
|
||||
|
||||
const updateRole = async (roleId: number, role: IRolePayload) => {
|
||||
|
@ -25,7 +25,7 @@ export const useServiceAccountsApi = () => {
|
||||
);
|
||||
|
||||
const response = await makeRequest(req.caller, req.id);
|
||||
return await response.json();
|
||||
return response.json();
|
||||
};
|
||||
|
||||
const removeServiceAccount = async (serviceAccountId: number) => {
|
||||
|
Loading…
Reference in New Issue
Block a user