fix: init auth for auth api route
This commit is contained in:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user