mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-22 12:20:34 +00:00
fix: api key delete bug (#1524)
This commit is contained in:
@@ -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))()
|
||||
}
|
||||
]}
|
||||
/>
|
||||
|
Reference in New Issue
Block a user