Files
cloud-v3/src/health.controller.ts
Первов Артем 05a9e0e535 first commit
2026-06-19 08:18:52 +03:00

18 lines
473 B
TypeScript

import { Controller, Get } from '@nestjs/common';
import { DbService } from './db/db.service';
@Controller()
export class HealthController {
constructor(private readonly db: DbService) {}
/** Проверяет доступность API и базы данных для деплоя и проверок здоровья. */
@Get('health')
async health() {
const database = await this.db.health();
return {
status: 'ok',
database,
};
}
}