aboutsummaryrefslogtreecommitdiff
path: root/apps/web/src/app/api
diff options
context:
space:
mode:
authorDhravya <[email protected]>2024-04-08 13:00:39 -0700
committerDhravya <[email protected]>2024-04-08 13:00:39 -0700
commit514f943caadd3a42c5611b752bb30c76dc3e492a (patch)
treee84abeb795eefd4a3974880b97d9e481189bf7d1 /apps/web/src/app/api
parentaggregate content from same space (diff)
downloadsupermemory-514f943caadd3a42c5611b752bb30c76dc3e492a.tar.xz
supermemory-514f943caadd3a42c5611b752bb30c76dc3e492a.zip
made it functional
Diffstat (limited to 'apps/web/src/app/api')
-rw-r--r--apps/web/src/app/api/query/route.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/web/src/app/api/query/route.ts b/apps/web/src/app/api/query/route.ts
index 4e2f0674..28f441bc 100644
--- a/apps/web/src/app/api/query/route.ts
+++ b/apps/web/src/app/api/query/route.ts
@@ -21,7 +21,7 @@ export async function GET(req: NextRequest) {
return NextResponse.json({ message: "Invalid Key, session not found." }, { status: 404 });
}
- const session = {session: sessionData[0], user: user[0]}
+ const session = { session: sessionData[0], user: user[0] }
const query = new URL(req.url).searchParams.get("q");
const sourcesOnly = new URL(req.url).searchParams.get("sourcesOnly") ?? "false";
@@ -36,8 +36,11 @@ export async function GET(req: NextRequest) {
}
})
+ console.log(resp.status)
+
if (resp.status !== 200 || !resp.ok) {
const errorData = await resp.json();
+ console.log(errorData)
return new Response(JSON.stringify({ message: "Error in CF function", error: errorData }), { status: resp.status });
}