You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
303 B

import { fail, ok, requireSession } from "@/lib/api";
export async function GET() {
const guard = await requireSession();
if (guard.response) return guard.response;
return ok({
username: guard.session.username,
role: guard.session.role,
user_id: guard.session.userId ?? null,
});
}