File size: 842 Bytes
f78b36a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import { Controller, Get } from '@nestjs/common';
import { ApiTags, ApiOperation, ApiResponse } from '@nestjs/swagger';

@ApiTags('Health')
@Controller()
export class AppController {
  @Get('health')
  @ApiOperation({ summary: 'Check API health status' })
  @ApiResponse({ status: 200, description: 'API is healthy' })
  getHealth() {
    return {
      status: 'ok',
      timestamp: new Date().toISOString(),
      service: 'Maternal Health Support API',
      clinical_safety_notice: 'CARE-SUPPORT TOOL - NOT A DIAGNOSTIC SYSTEM',
    };
  }

  @Get()
  @ApiOperation({ summary: 'API Root' })
  @ApiResponse({ status: 200, description: 'Welcome message' })
  getHello() {
    return {
      message: 'Welcome to Maternal Health Support API',
      version: '1.0.0',
      docs: '/api/v1/docs',
      health: '/api/v1/health',
    };
  }
}