2025-12-18 23:05:04 +05:30
|
|
|
import { Controller, Get } from '@nestjs/common';
|
|
|
|
|
import { ApiTags, ApiOperation, ApiResponse } from '@nestjs/swagger';
|
|
|
|
|
import { AppService } from './app.service';
|
2025-12-20 19:22:30 +05:30
|
|
|
import { Public } from './auth';
|
2025-12-18 23:05:04 +05:30
|
|
|
|
|
|
|
|
@ApiTags('Health')
|
|
|
|
|
@Controller()
|
2025-12-20 19:22:30 +05:30
|
|
|
@Public()
|
2025-12-18 23:05:04 +05:30
|
|
|
export class AppController {
|
|
|
|
|
constructor(private readonly appService: AppService) {}
|
|
|
|
|
|
|
|
|
|
@Get()
|
|
|
|
|
@ApiOperation({ summary: 'Get API welcome message' })
|
|
|
|
|
@ApiResponse({ status: 200, description: 'API is running' })
|
|
|
|
|
getHello(): string {
|
|
|
|
|
return this.appService.getHello();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Get('health')
|
|
|
|
|
@ApiOperation({ summary: 'Health check endpoint' })
|
|
|
|
|
@ApiResponse({ status: 200, description: 'Service is healthy' })
|
|
|
|
|
getHealth() {
|
|
|
|
|
return this.appService.getHealth();
|
|
|
|
|
}
|
|
|
|
|
}
|