mirror of
https://github.com/better-auth/better-auth.git
synced 2026-06-03 12:57:09 -05:00
docs: auth.api.getSession instead of auth.getSession (#784)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user