diff --git a/directus/data.db b/directus/data.db index 1bf1898..a996d42 100644 Binary files a/directus/data.db and b/directus/data.db differ diff --git a/src/windmill/api.ts b/src/windmill/api.ts index 91f5647..e98925b 100644 --- a/src/windmill/api.ts +++ b/src/windmill/api.ts @@ -4,6 +4,7 @@ type Options = { token: string instance: string flow: string + debug: boolean } type Data = { @@ -26,13 +27,14 @@ type Data = { export default defineOperationApi({ id: 'windmill', - handler: async ({ token, instance, flow }, { data }) => { + handler: async ({ token, instance, flow, debug }, { data }) => { const last = data.$last as Data const body = JSON.stringify({ event: last.event ?? "manual", instance: instance, collection: last.collection ?? last.body?.collection, - keys: last.keys ?? last.body?.keys ?? [last.key] + keys: last.keys ?? last.body?.keys ?? [last.key], + debug: debug, }) return await fetch(`https://windmill.swablab.de/api/r/${flow}`, { diff --git a/src/windmill/app.ts b/src/windmill/app.ts index a81e50f..e2b0047 100644 --- a/src/windmill/app.ts +++ b/src/windmill/app.ts @@ -5,7 +5,7 @@ export default defineOperationApp({ name: "swablab windmill", icon: "wind_power", description: "trigger a windmill action", - overview: ({ instance, flow }) => [ + overview: ({ instance, flow, debug }) => [ { label: "Instance", text: instance, @@ -14,6 +14,10 @@ export default defineOperationApp({ label: "Flow", text: flow, }, + { + label: "Debug", + text: debug, + }, ], options: [ { @@ -24,7 +28,7 @@ export default defineOperationApp({ width: "full", interface: "input", required: true, - note: "See Vaultwarden", + note: "see vaultwarden", options: { masked: true } @@ -63,5 +67,18 @@ export default defineOperationApp({ note: "https://windmill.swablab.de/api/r/..." }, }, + { + field: "debug", + name: "Debug", + type: "boolean", + schema: { + default_value: false + }, + meta: { + width: "full", + interface: "checkbox", + note: "not always suppported" + }, + }, ], });