feat: add public share options for workflow
This commit is contained in:
@@ -5,7 +5,9 @@ import { db } from "@/db/db";
|
||||
import type { MachineType, WorkflowVersionType } from "@/db/schema";
|
||||
import { machinesTable, workflowRunsTable } from "@/db/schema";
|
||||
import type { APIKeyUserType } from "@/server/APIKeyBodyRequest";
|
||||
import { getRunsData } from "@/server/getRunsData";
|
||||
import { ComfyAPI_Run } from "@/types/ComfyAPI_Run";
|
||||
import { auth } from "@clerk/nextjs";
|
||||
import { and, eq } from "drizzle-orm";
|
||||
import { revalidatePath } from "next/cache";
|
||||
import "server-only";
|
||||
@@ -219,3 +221,10 @@ export const createRun = withServerPromise(
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
export async function checkStatus(run_id: string) {
|
||||
const { userId } = auth();
|
||||
if (!userId) throw new Error("User not found");
|
||||
|
||||
return await getRunsData(run_id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user