Files
image-platform/apps/old-backend/src/health/health.controller.ts

22 lines
769 B
TypeScript
Raw Normal View History

import { Controller, Get } from "@nestjs/common"
import { ApiOkResponse, ApiOperation, ApiTags } from "@nestjs/swagger"
import { HealthResponseDto } from "./health-response.dto"
@ApiTags("system")
@Controller("health")
export class HealthController {
@Get()
@ApiOperation({
summary: "проверить состояние Backend API",
description: "Возвращает простой health-check ответ. Используется для локальной проверки, мониторинга и smoke tests.",
})
@ApiOkResponse({ description: "Backend API доступен и отвечает.", type: HealthResponseDto })
getHealth(): HealthResponseDto {
return {
service: "image-platform-api",
status: "ok",
}
}
}