Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

log auth in api routes

Brendan Allan849d1768e5ce
diff --git a/apps/web/app/api/utils.ts b/apps/web/app/api/utils.ts
index 2652a7f45..82546e87d 100644
--- a/apps/web/app/api/utils.ts
+++ b/apps/web/app/api/utils.ts
@@ -14,6 +14,7 @@ async function getAuth(c: Context) {
let user;
if (authHeader?.length === 36) {
+ console.log("Using API key auth");
const res = await db()
.select()
.from(users)
@@ -34,6 +35,8 @@ async function getAuth(c: Context) {
user = await getCurrentUser();
}
+ console.log("User: ", user);
+
if (!user) return;
return { user };
}