This commit is contained in:
Nicholas Koben Kao
2024-01-24 12:53:43 -08:00
parent b1e9bcc4e6
commit eb04f246a4
4 changed files with 12 additions and 3 deletions
@@ -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
+2 -2
View File
@@ -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>
);
+2 -1
View File
@@ -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"
}),
},