import { Controller, Get } from '@nestjs/common';
import { HealthService } from './health.service';

@Controller()
export class HealthController {
  constructor(private readonly healthService: HealthService) {}

  @Get()
  getHello(): string {
    return this.healthService.getHello();
  }

  @Get('health')
  async getHealth(): Promise<{ status: string; database: string; checkedAt: string }> {
    return this.healthService.getHealth();
  }
}
