mirror of
https://github.com/langgenius/dify.git
synced 2026-11-13 06:41:07 +08:00
Co-authored-by: Jyong <76649700+JohnJyong@users.noreply.github.com> Co-authored-by: hjlarry <hjlarry@163.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: zhaohao1004 <zhaohao1004@gmail.com> Co-authored-by: yyh <yuanyouhuilyz@gmail.com> Co-authored-by: FFXN <lizy@dify.ai>
9 lines
422 B
TypeScript
9 lines
422 B
TypeScript
import { useMutation } from '@tanstack/react-query'
|
|
import { consoleQuery } from '@/service/console'
|
|
|
|
export function useDatasetApiKeyMutations() {
|
|
const createKey = useMutation(consoleQuery.datasets.apiKeys.post.mutationOptions())
|
|
const deleteKey = useMutation(consoleQuery.datasets.apiKeys.byApiKeyId.delete.mutationOptions())
|
|
return { createKey, deleteKey, pending: createKey.isPending || deleteKey.isPending }
|
|
}
|