import { adminRequest, hasLotteryAdminApiBaseUrl } from "@/lib/admin-http";
import type { AdminPingResponse } from "@/types/api/admin-ping";


/** `GET /api/v1/admin/ping`（需 Bearer Token） */
export async function getAdminPing(): Promise<AdminPingResponse | null> {
  if (!hasLotteryAdminApiBaseUrl()) {
    return null;
  }
  try {
    return await adminRequest.get<AdminPingResponse>(
      `/admin/ping`,
    );
  } catch {
    return null;
  }
}
