waha / src /api /health.controller.ts
NitinBot002's picture
Upload 384 files
4327358 verified
import { Controller, Get } from '@nestjs/common';
import { ApiOperation, ApiSecurity, ApiTags } from '@nestjs/swagger';
import { HealthCheck } from '@nestjs/terminus';
import { WAHAHealthCheckService } from '../core/abc/WAHAHealthCheckService';
@ApiSecurity('api_key')
@Controller('health')
@ApiTags('๐Ÿ” Observability')
export class HealthController {
constructor(private wahaHealth: WAHAHealthCheckService) {}
@Get()
@HealthCheck()
@ApiOperation({
summary: 'Check the health of the server',
description:
"Perform all health checks and return the server's health status.",
})
async check() {
return this.wahaHealth.check();
}
}