refactor: Use import flow as static flow model method

This commit is contained in:
Faruk AYDIN
2025-03-10 16:01:41 +01:00
parent c4a94ed902
commit 75a7a068f3
2 changed files with 7 additions and 2 deletions

View File

@@ -1,8 +1,8 @@
import { renderObject } from '../../../../helpers/renderer.js';
import importFlow from '../../../../helpers/import-flow.js';
import Flow from '../../../../models/flow.js';
export default async function importFlowController(request, response) {
const flow = await importFlow(request.currentUser, flowParams(request));
const flow = await Flow.import(request.currentUser, flowParams(request));
return renderObject(response, flow, { status: 201 });
}