app.controller.tsβ’671 B
import { Controller, Get } from '@nestjs/common'
import { ApiTags, ApiOperation, ApiResponse } from '@nestjs/swagger'
import { AppService } from './app.service'
import { HealthResponseDto } from './dto/health-response.dto'
@ApiTags('health')
@Controller()
export class AppController {
constructor(private readonly appService: AppService) {}
@Get('health')
@ApiOperation({
summary: 'Health check endpoint',
description: 'Returns the health status of the service',
})
@ApiResponse({
status: 200,
description: 'Service is healthy',
type: HealthResponseDto,
})
getHealth(): HealthResponseDto {
return this.appService.getHealth()
}
}