feat: Complete export flow rest API endpoint

This commit is contained in:
Faruk AYDIN
2025-01-10 17:21:43 +03:00
parent 169c86a748
commit c180b98460
10 changed files with 362 additions and 19 deletions

View File

@@ -0,0 +1,9 @@
export default async (request, response) => {
const flow = await request.currentUser.authorizedFlows
.findById(request.params.flowId)
.throwIfNotFound();
const { exportedFlowAsString, slug } = await flow.export();
response.status(201).attachment(slug).send(exportedFlowAsString);
};