|
|
@@ -12,6 +12,10 @@ export const POST: APIRoute = async ({ request }) => {
|
|
|
await init();
|
|
|
|
|
|
const currentUser = getUserFromRequest(request);
|
|
|
+
|
|
|
+ console.log(request.headers.get("cookie"));
|
|
|
+ console.log(currentUser);
|
|
|
+
|
|
|
if (!currentUser) return json({ error: "Not authenticated" }, 401);
|
|
|
|
|
|
const id = crypto.randomUUID().replace(/-/g, "").slice(0, 12);
|