MCPcopy Create free account
hub / github.com/emwalker/digraph / GET

Function GET

next/app/session/route.ts:26–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24
25// read session
26export async function GET() {
27 const session = await getIronSession<SessionData>(cookies(), sessionOptions)
28
29 // simulate looking up the user in db
30 await sleep(250)
31
32 if (session.isLoggedIn !== true) {
33 return Response.json(defaultSession)
34 }
35
36 return Response.json(session)
37}
38
39// logout
40export async function DELETE() {

Callers

nothing calls this directly

Calls 1

sleepFunction · 0.90

Tested by

no test coverage detected