Flows and dashboards are created by POST under an issued or superuser-pinned id; PUT only updates; deleted flows leave a tombstone with their key; the controller stores by id and runs by key, hooks live under /hooks/<flow id>; a key with state or queued work behind it is refused until cleared
This commit is contained in:
@@ -840,7 +840,7 @@ export function UseInFlow({
|
||||
const flows = data?.data ?? []
|
||||
const place = useMutation({
|
||||
mutationFn: async (flowName: string) => {
|
||||
const { definition } = await FlowsService.readFlow({ name: flowName })
|
||||
const { definition } = await FlowsService.readFlow({ flowId: flowName })
|
||||
const nodes = definition.nodes ?? []
|
||||
const existing = deviceNodeOf(nodes, device.id)
|
||||
const node = existing ?? {
|
||||
@@ -854,7 +854,7 @@ export function UseInFlow({
|
||||
const placed = port ? withPort(node, port) : node
|
||||
if (placed !== existing) {
|
||||
await FlowsService.saveFlow({
|
||||
name: flowName,
|
||||
flowId: flowName,
|
||||
requestBody: {
|
||||
...definition,
|
||||
nodes: existing
|
||||
|
||||
Reference in New Issue
Block a user