feat: add support to rename flow step

This commit is contained in:
Ali BARIN
2025-01-07 13:46:07 +00:00
parent 583c09ce40
commit e29e71bdf1
9 changed files with 140 additions and 30 deletions

View File

@@ -6,19 +6,20 @@ export default function useUpdateStep() {
const queryClient = useQueryClient();
const query = useMutation({
mutationFn: async ({ id, appKey, key, connectionId, parameters }) => {
mutationFn: async ({ id, appKey, key, connectionId, name, parameters }) => {
const { data } = await api.patch(`/v1/steps/${id}`, {
appKey,
key,
connectionId,
name,
parameters,
});
return data;
},
onSuccess: () => {
queryClient.invalidateQueries({
onSuccess: async () => {
await queryClient.invalidateQueries({
queryKey: ['flows'],
});
},