fix: can not reset system variables (#21750)

This commit is contained in:
Joel
2025-07-01 16:00:17 +08:00
committed by GitHub
parent 1a7ad195f0
commit 5c11c22302
2 changed files with 10 additions and 16 deletions

View File

@@ -139,7 +139,7 @@ export const useResetConversationVar = (appId: string) => {
export const useResetToLastRunValue = (appId: string) => {
return useMutation({
mutationKey: [NAME_SPACE, 'reset to last run value', appId],
mutationFn: async (varId: string) => {
mutationFn: async (varId: string): Promise<{ value: any }> => {
return put(`apps/${appId}/workflows/draft/variables/${varId}/reset`)
},
})