Files

20 lines
492 B
TypeScript

import { NextResponse } from 'next/server';
import { authModePublic } from '@/lib/auth/room-access';
import { readAuthSession } from '@/lib/auth/session';
export const runtime = 'nodejs';
export async function GET() {
const session = await readAuthSession();
return NextResponse.json({
...authModePublic(),
session: session
? {
channelId: session.channelId,
channelName: session.channelName,
exp: session.exp,
}
: null,
});
}