feat(admin): add audited Refine staging console

This commit is contained in:
Jesse
2026-07-27 19:55:38 +08:00
parent 43581ac0f7
commit 02ec5db361
35 changed files with 4545 additions and 272 deletions
@@ -0,0 +1,22 @@
import { NextResponse } from "next/server";
import { requireAdminSession } from "@/lib/admin/auth";
import { adminErrorResponse } from "@/lib/admin/http";
export const runtime = "nodejs";
export async function GET() {
try {
const { user, role } = await requireAdminSession();
return NextResponse.json({
user: {
id: user.id,
email: user.email,
name: user.name,
role,
},
});
} catch (error) {
return adminErrorResponse(error);
}
}