import { getServerSession, getToken } from '#auth'

export default eventHandler(async (event) => {
  const session = await getServerSession(event)
  if (!session) {
    return { status: 'unauthenticated!' }
  }
  const token = await getToken({ event })
  return token || { status: 'no token present' }
})