Files
sign/packages/auth/server/routes/session.ts

11 lines
322 B
TypeScript
Raw Normal View History

2025-01-02 15:33:37 +11:00
import { Hono } from 'hono';
import type { SessionValidationResult } from '../lib/session/session';
import { getSession } from '../lib/utils/get-session';
export const sessionRoute = new Hono().get('/session', async (c) => {
const session: SessionValidationResult = await getSession(c);
return c.json(session);
});