forked from mtusi2026/mtusi2026lab2
18 lines
380 B
TypeScript
18 lines
380 B
TypeScript
import { Controller, Get } from '@nestjs/common';
|
|
import { HealthService } from './health.service.js';
|
|
|
|
@Controller('health')
|
|
export class HealthController {
|
|
constructor(private readonly healthService: HealthService) {}
|
|
|
|
@Get('live')
|
|
getLive() {
|
|
return this.healthService.getLiveness();
|
|
}
|
|
|
|
@Get('ready')
|
|
async getReady() {
|
|
return this.healthService.getReadiness();
|
|
}
|
|
}
|