Skip to content

Commit

Permalink
fix: add await to mutateAsync function calls (#2232)
Browse files Browse the repository at this point in the history
  • Loading branch information
geraldmaboshe authored Oct 7, 2024
1 parent 954269e commit cd3e8b0
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const UpdateKeyEnabled: React.FC<Props> = ({ apiKey }) => {
});

async function onSubmit(values: z.infer<typeof formSchema>) {
updateEnabled.mutateAsync(values);
await updateEnabled.mutateAsync(values);
}

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export const UpdateKeyExpiration: React.FC<Props> = ({ apiKey }) => {
});

async function onSubmit(values: z.infer<typeof formSchema>) {
changeExpiration.mutateAsync(values);
await changeExpiration.mutateAsync(values);
}

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const UpdateKeyName: React.FC<Props> = ({ apiKey }) => {
});

async function onSubmit(values: z.infer<typeof formSchema>) {
updateName.mutateAsync(values);
await updateName.mutateAsync(values);
}
return (
<Form {...form}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const UpdateKeyOwnerId: React.FC<Props> = ({ apiKey }) => {
});

async function onSubmit(values: z.infer<typeof formSchema>) {
updateOwnerId.mutateAsync(values);
await updateOwnerId.mutateAsync(values);
}
return (
<Form {...form}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export const UpdateKeyRatelimit: React.FC<Props> = ({ apiKey }) => {
},
});
async function onSubmit(values: z.infer<typeof formSchema>) {
updateRatelimit.mutateAsync(values);
await updateRatelimit.mutateAsync(values);
}
return (
<Form {...form}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export const UpdateKeyRemaining: React.FC<Props> = ({ apiKey }) => {
if (values.refill?.interval === "none") {
delete values.refill;
}
updateRemaining.mutateAsync(values);
await updateRemaining.mutateAsync(values);
}

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export const UpdateIpWhitelist: React.FC<Props> = ({ api, workspace }) => {
});

async function onSubmit(values: z.infer<typeof formSchema>) {
updateIps.mutateAsync(values);
await updateIps.mutateAsync(values);
}

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const UpdateNamespaceName: React.FC<Props> = ({ namespace }) => {
if (values.name === namespace.name || !values.name) {
return toast.error("Please provide a valid name before saving.");
}
updateName.mutateAsync(values);
await updateName.mutateAsync(values);
}

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const UpdateWorkspaceName: React.FC<Props> = ({ workspace }) => {
});

async function onSubmit(values: z.infer<typeof formSchema>) {
updateName.mutateAsync(values);
await updateName.mutateAsync(values);
}

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const UpdateRootKeyName: React.FC<Props> = ({ apiKey }) => {
});

async function onSubmit(values: z.infer<typeof formSchema>) {
updateName.mutateAsync(values);
await updateName.mutateAsync(values);
}
return (
<Form {...form}>
Expand Down

0 comments on commit cd3e8b0

Please sign in to comment.