status
This commit is contained in:
@@ -19,6 +19,7 @@ export async function POST(request: Request) {
|
||||
if (!data || error) return error;
|
||||
|
||||
const { checkpoint_id, error_log, status, folder_path } = data;
|
||||
console.log( checkpoint_id, error_log, status, folder_path )
|
||||
|
||||
if (status === "success") {
|
||||
await db
|
||||
|
||||
@@ -89,7 +89,7 @@ export const columns: ColumnDef<CheckpointItemList>[] = [
|
||||
</span>
|
||||
|
||||
{checkpoint.is_public ? (
|
||||
<Badge variant="orange">Public</Badge>
|
||||
<Badge variant="green">Public</Badge>
|
||||
) : (
|
||||
<Badge variant="orange">Private</Badge>
|
||||
)}
|
||||
@@ -112,7 +112,7 @@ export const columns: ColumnDef<CheckpointItemList>[] = [
|
||||
},
|
||||
cell: ({ row }) => {
|
||||
return (
|
||||
<Badge variant={row.original.status === "failed" ? "red" : "green"}>
|
||||
<Badge variant={row.original.status === "failed" ? "red" : (row.original.status === "started" ? "yellow" : "green")}>
|
||||
{row.original.status}
|
||||
</Badge>
|
||||
);
|
||||
|
||||
@@ -115,6 +115,7 @@ function getUrl(civitai_url: string) {
|
||||
export const addCivitaiCheckpoint = withServerPromise(
|
||||
async (data: z.infer<typeof addCivitaiCheckpointSchema>) => {
|
||||
const { userId, orgId } = auth();
|
||||
console.log("START")
|
||||
console.log("1");
|
||||
|
||||
if (!data.civitai_url) return { error: "no civitai_url" };
|
||||
@@ -221,7 +222,7 @@ async function uploadCheckpoint(
|
||||
volume_name: v.volume_name,
|
||||
volume_id: v.id,
|
||||
checkpoint_id: c.id,
|
||||
callback_url: `${protocol}://${domain}/api/volume-updated`,
|
||||
callback_url: `${protocol}://${domain}/api/volume-upload`,
|
||||
upload_type: "checkpoint"
|
||||
}),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user