package com.huangzj.server.web;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/** 最小 HTTP 探活（原 {@code com.huangzj.comm.http} 合并至此）。 */
@RestController
@RequestMapping("/api")
public class PingController {

    @GetMapping("/ping")
    public PingPayload ping() {
        return new PingPayload(true, System.currentTimeMillis());
    }

    public record PingPayload(boolean ok, long serverTimeMs) {}
}
