Files
backend/src/app.controller.ts

24 lines
681 B
TypeScript
Raw Normal View History

import { Controller, Get } from '@nestjs/common';
import { ApiTags, ApiOperation, ApiResponse } from '@nestjs/swagger';
import { AppService } from './app.service';
@ApiTags('Health')
@Controller()
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();
}
}