import { requireAdmin } from '../../utils/auth';

export default defineEventHandler(async (event) => {
  const user = await requireAdmin(event);

  return {
    success: true,
    data: {
      isAdmin: true,
      userId: user.id,
      email: user.email ?? null,
    },
  };
});
