feat: add new auth_request flow for logging in with comfy deploy

This commit is contained in:
BennyKok
2024-01-22 14:11:14 +08:00
parent 3043093d22
commit 47168930dc
25 changed files with 2424 additions and 272 deletions
+4 -3
View File
@@ -1,11 +1,12 @@
import { parseDataSafe } from "../../../../lib/parseDataSafe";
import { handleResourceUpload } from "@/server/resource";
import { NextResponse } from "next/server";
import { z } from "zod";
import { parseDataSafe } from "../../../../lib/parseDataSafe";
const Request = z.object({
file_name: z.string(),
run_id: z.string(),
type: z.string(),
});
@@ -29,7 +30,7 @@ export async function GET(request: Request) {
{
url: uploadUrl,
},
{ status: 200 }
{ status: 200 },
);
} catch (error: unknown) {
const errorMessage =
@@ -38,7 +39,7 @@ export async function GET(request: Request) {
{
error: errorMessage,
},
{ status: 500 }
{ status: 500 },
);
}
}