mirror of
https://github.com/langgenius/dify.git
synced 2026-04-05 19:32:16 +08:00
fix: adding a restore API for version control on workflow draft (#33582)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -113,6 +113,13 @@ export const useDeleteWorkflow = () => {
|
||||
})
|
||||
}
|
||||
|
||||
export const useRestoreWorkflow = () => {
|
||||
return useMutation({
|
||||
mutationKey: [NAME_SPACE, 'restore'],
|
||||
mutationFn: (url: string) => post<CommonResponse & { updated_at: number, hash: string }>(url, {}, { silent: true }),
|
||||
})
|
||||
}
|
||||
|
||||
export const usePublishWorkflow = () => {
|
||||
return useMutation({
|
||||
mutationKey: [NAME_SPACE, 'publish'],
|
||||
|
||||
Reference in New Issue
Block a user