20 lines
463 B
TypeScript
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" };
|
|
}
|
|
}
|