fix: init auth for auth api route

This commit is contained in:
Henry
2025-05-08 15:36:11 +01:00
parent d602daa8e5
commit 68a5c270a6

View File

@@ -1,8 +1,12 @@
import { toNodeHandler } from "better-auth/node";
import { auth } from "@kan/auth";
import { initAuth } from "@kan/auth";
import { createDrizzleClient } from "@kan/db/client";
export const config = { api: { bodyParser: false } };
const auth = initAuth(createDrizzleClient());
export default toNodeHandler(auth.handler);
// export const runtime = "edge";