diff --git a/src/env.mjs b/src/env.mjs index 78f2192..11117f7 100644 --- a/src/env.mjs +++ b/src/env.mjs @@ -8,7 +8,7 @@ export const env = createEnv({ */ server: { DATABASE_URL: z.string().url(), - // DIRECT_DATABASE_URL: z.string().url(), + DIRECT_DATABASE_URL: z.string().url(), NODE_ENV: z.enum(["development", "test", "production"]), NEXTAUTH_SECRET: process.env.NODE_ENV === "production" diff --git a/src/pages/api/v2/chat.ts b/src/pages/api/v2/chat.ts index e6b2e0d..f60b776 100644 --- a/src/pages/api/v2/chat.ts +++ b/src/pages/api/v2/chat.ts @@ -4,7 +4,6 @@ import { withAccelerate } from '@prisma/extension-accelerate'; import { OpenAIStream, StreamingTextResponse } from 'ai' import { Configuration, OpenAIApi } from 'openai-edge' import { env } from "@/env.mjs"; -import { auth } from "../auth/[...nextauth]"; @@ -20,14 +19,14 @@ export default async function POST(req: Request) { // handle auth // eslint-disable-next-line @typescript-eslint/no-unsafe-call - const session = req.headers.getSetCookie() + // const session = req.headers.getSetCookie() - console.log({ session }) - if (!session){ - return new Response('Unauthorized', { - status: 401 - }) - } + // console.log({ session }) + // if (!session){ + // return new Response('Unauthorized', { + // status: 401 + // }) + // } const prisma = new PrismaClient().$extends(withAccelerate());