1
0
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:
Nuno Góis 2023-10-02 13:59:53 +01:00 committed by GitHub
parent 4167a60588
commit 280e21f073
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 6 deletions

View File

@ -25,7 +25,7 @@ const useAddonsApi = () => {
method: 'DELETE',
});
return await makeRequest(req.caller, req.id);
return makeRequest(req.caller, req.id);
};
const updateAddon = useCallback(

View File

@ -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],
);

View File

@ -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) => {

View File

@ -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) => {