vendaweb-api/src/app.controller.ts

21 lines
446 B
TypeScript

import { Controller, Get } from '@nestjs/common';
import { ApiTags, ApiOperation } from '@nestjs/swagger';
import { APP_VERSION } from './version';
@ApiTags('Main')
@Controller('v1')
export class AppController {
@Get('version')
@ApiOperation({ summary: 'Get App Version' })
getVersion() {
return { version: APP_VERSION };
}
@Get('health')
@ApiOperation({ summary: 'Health check' })
healthCheck() {
return { status: 'ok' };
}
}