fix: api key delete bug (#1524)

This commit is contained in:
Archer
2024-05-17 18:03:14 +08:00
committed by GitHub
parent 2f93dedfb6
commit ba517b6a73
2 changed files with 78 additions and 71 deletions

View File

@@ -68,7 +68,9 @@ const ApiKeyTable = ({ tips, appId }: { tips: string; appId?: string }) => {
});
const { mutate: onclickRemove, isLoading: isDeleting } = useMutation({
mutationFn: async (id: string) => delOpenApiById(id),
mutationFn: async (id: string) => {
return delOpenApiById(id);
},
onSuccess() {
refetch();
}
@@ -212,7 +214,7 @@ const ApiKeyTable = ({ tips, appId }: { tips: string; appId?: string }) => {
label: t('common.Delete'),
icon: 'delete',
type: 'danger',
onClick: openConfirm(() => onclickRemove(_id))
onClick: () => openConfirm(() => onclickRemove(_id))()
}
]}
/>