fix format
This commit is contained in:
		
							parent
							
								
									457698695c
								
							
						
					
					
						commit
						e65dff9b72
					
				@ -11,7 +11,7 @@ import { db } from "@/db/db";
 | 
			
		||||
import { workflowTable, workflowVersionTable } from "@/db/schema";
 | 
			
		||||
import { getRelativeTime } from "@/lib/getRelativeTime";
 | 
			
		||||
import { getMachines } from "@/server/curdMachine";
 | 
			
		||||
import { desc, eq, sql } from "drizzle-orm";
 | 
			
		||||
import { desc, eq } from "drizzle-orm";
 | 
			
		||||
import { Play } from "lucide-react";
 | 
			
		||||
 | 
			
		||||
export async function findFirstTableWithVersion(workflow_id: string) {
 | 
			
		||||
@ -57,7 +57,7 @@ export default async function Page({
 | 
			
		||||
          <CardTitle>Run</CardTitle>
 | 
			
		||||
        </CardHeader>
 | 
			
		||||
 | 
			
		||||
        <CardContent></CardContent>
 | 
			
		||||
        <CardContent />
 | 
			
		||||
      </Card>
 | 
			
		||||
    </div>
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
@ -1,14 +1,9 @@
 | 
			
		||||
import { parseDataSafe } from "../../../lib/parseDataSafe";
 | 
			
		||||
import { db } from "@/db/db";
 | 
			
		||||
import {
 | 
			
		||||
  workflowRunStatus,
 | 
			
		||||
  workflowRunsTable,
 | 
			
		||||
  workflowTable,
 | 
			
		||||
  workflowVersionTable,
 | 
			
		||||
} from "@/db/schema";
 | 
			
		||||
import { eq, sql } from "drizzle-orm";
 | 
			
		||||
import { workflowRunsTable } from "@/db/schema";
 | 
			
		||||
import { eq } from "drizzle-orm";
 | 
			
		||||
import { NextResponse } from "next/server";
 | 
			
		||||
import { ZodFormattedError, z } from "zod";
 | 
			
		||||
import { z } from "zod";
 | 
			
		||||
 | 
			
		||||
const Request = z.object({
 | 
			
		||||
  run_id: z.string(),
 | 
			
		||||
@ -30,7 +25,7 @@ export async function POST(request: Request) {
 | 
			
		||||
  const [data, error] = await parseDataSafe(Request, request);
 | 
			
		||||
  if (!data || error) return error;
 | 
			
		||||
 | 
			
		||||
  let { run_id, status } = data;
 | 
			
		||||
  const { run_id, status } = data;
 | 
			
		||||
 | 
			
		||||
  const workflow_run = await db
 | 
			
		||||
    .update(workflowRunsTable)
 | 
			
		||||
@ -50,6 +45,6 @@ export async function POST(request: Request) {
 | 
			
		||||
        "Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, OPTIONS",
 | 
			
		||||
        "Access-Control-Allow-Headers": "Content-Type, Authorization",
 | 
			
		||||
      },
 | 
			
		||||
    },
 | 
			
		||||
    }
 | 
			
		||||
  );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user