docs: auth.api.getSession instead of auth.getSession (#784)

This commit is contained in:
Robi
2024-12-06 14:51:59 +03:00
committed by GitHub
parent 2f9f30813c
commit 8585be702a

View File

@@ -39,7 +39,7 @@ import { fromNodeHeaders } from "better-auth/node";
import { auth } from "./auth"; //your better auth instance
app.get("/api/me", async (req, res) => {
const session = await auth.getSession({
const session = await auth.api.getSession({
headers: fromNodeHeaders(req.headers),
});
return res.json(session);