From dddbc897caaec3c20b38776de08c69a863340d9c Mon Sep 17 00:00:00 2001 From: Prince86 Date: Tue, 14 Nov 2023 16:48:42 +0530 Subject: [PATCH] passing cookies as it is instead of token --- src/app/api/chatmodel/[chatid]/route.ts | 8 ++++---- src/app/api/generateTitle/[chatid]/[orgid]/route.ts | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/app/api/chatmodel/[chatid]/route.ts b/src/app/api/chatmodel/[chatid]/route.ts index a736ba89..746b3672 100644 --- a/src/app/api/chatmodel/[chatid]/route.ts +++ b/src/app/api/chatmodel/[chatid]/route.ts @@ -94,10 +94,10 @@ export async function POST( { method: "POST", body: JSON.stringify({ chat: _chat }), - headers: { - Authorization: `Bearer ${await getToken()}`, - }, - // headers: [...cookiesArray] + // headers: { + // Authorization: `Bearer ${await getToken()}`, + // }, + headers: [...cookiesArray], }, ); await db diff --git a/src/app/api/generateTitle/[chatid]/[orgid]/route.ts b/src/app/api/generateTitle/[chatid]/[orgid]/route.ts index 7ec94997..d008ed46 100644 --- a/src/app/api/generateTitle/[chatid]/[orgid]/route.ts +++ b/src/app/api/generateTitle/[chatid]/[orgid]/route.ts @@ -35,10 +35,10 @@ export async function POST( { method: "POST", body: JSON.stringify({ chatTitle: fullResponse }), - headers: { - Authorization: `Bearer ${await getToken()}`, - }, - // headers: cookiesArray + // headers: { + // Authorization: `Bearer ${await getToken()}`, + // }, + headers: cookiesArray, }, ); await db