feat: some changes and admin

This commit is contained in:
2026-03-31 16:09:03 +09:00
parent 7e07c7ea99
commit 0a7e5618ee
55 changed files with 2156 additions and 8 deletions

View File

@@ -0,0 +1,20 @@
import { NextResponse } from 'next/server';
import { getSessionUser } from '@/lib/auth/session';
export const dynamic = 'force-dynamic';
export async function GET() {
const user = await getSessionUser();
if (!user) {
return NextResponse.json({ user: null }, { status: 401 });
}
return NextResponse.json({
user: {
id: user.id,
email: user.email,
is_approved: user.is_approved,
is_admin: user.is_admin,
},
});
}