Skip to content

armgit / fx0

Public Imported from GitHub
0

A lightweight design agent built with libfx. Describe a page and an agent writes it as one HTML file.

TypeScript
429 B
Raw Blame
import { NextResponse } from 'next/server'
import { publicUser } from '@/lib/auth'
import { isAuthenticatedSession } from '@/lib/secure-session'
import { withRequestSession } from '@/lib/request-session'

export const GET = withRequestSession(async (_request, session) => {
  return NextResponse.json({ user: isAuthenticatedSession(session) ? publicUser(session) : null }, {
    headers: { 'Cache-Control': 'no-store' },
  })
})