Skip to content

Commit

Permalink
attempt to fix /ai
Browse files Browse the repository at this point in the history
  • Loading branch information
berekuk committed Dec 5, 2024
1 parent ab23814 commit 1f4e5b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/hub/src/app/ai/api/create/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,11 @@ export async function POST(req: Request) {

saveWorkflowToDbOnUpdates(workflow);

const stream = workflow.runAsStream();

// this is async but we don't need to wait for it
createDbWorkflow(workflow, user);

const stream = workflow.runAsStream();

return new Response(stream as ReadableStream, {
headers: {
"Content-Type": "text/event-stream",
Expand Down

0 comments on commit 1f4e5b4

Please sign in to comment.