Files
plp/apps/api/src/health/health.controller.ts
T
2026-09-14 12:47:37 +08:00

20 lines
463 B
TypeScript

import { Controller, Get, Inject } from "@nestjs/common";
import { HealthService } from "./health.service.js";
@Controller("health")
export class HealthController {
constructor(
@Inject(HealthService) private readonly healthService: HealthService,
) {}
@Get()
check(): Promise<{ status: "ok"; postgres: "up"; redis: "up" }> {
return this.healthService.check();
}
@Get("live")
live(): { status: "ok" } {
return { status: "ok" };
}
}