Revert unwanted auth changes (#1551)

This commit is contained in:
Luke Vella 2025-02-08 21:30:36 +07:00 committed by GitHub
parent ffafcbdb43
commit 24558c26bd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
44 changed files with 651 additions and 625 deletions

View file

@ -1,5 +1,4 @@
import { waitUntil } from "@vercel/functions";
import type { NextRequest } from "next/server";
import { PostHog } from "posthog-node";
function PostHogClient() {
@ -22,10 +21,3 @@ export function posthogApiHandler() {
console.error("Failed to flush PostHog events:", error);
}
}
export function withPosthog(handler: (req: NextRequest) => Promise<Response>) {
return async (req: NextRequest) => {
const res = await handler(req);
posthogApiHandler();
return res;
};
}