19 lines
499 B
TypeScript
19 lines
499 B
TypeScript
|
|
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: "Проверить состояние API" })
|
||
|
|
@ApiOkResponse({ type: HealthResponseDto })
|
||
|
|
getHealth(): HealthResponseDto {
|
||
|
|
return {
|
||
|
|
service: "image-platform-api",
|
||
|
|
status: "ok",
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|