import { Controller, Get } from "@nestjs/common";
import { HealthService } from "../services/health.service.js";
import { CpuInfoDto } from "@sigma/common";

@Controller("health")
export class HealthController {
  constructor(private healthService: HealthService) {}

  @Get("/cpu")
  getCpuInfo(): CpuInfoDto {
    return { usage: this.healthService.getServerCpuUsage() };
  }
}
