gohorsejobs/backoffice/src/app.controller.ts
2026-01-17 18:23:41 -03:00

27 lines
644 B
TypeScript

import { Controller, Get, Req } from '@nestjs/common';
import { ApiOperation, ApiTags } from '@nestjs/swagger';
import { AppService } from './app.service';
import { Public } from './auth/public.decorator';
@ApiTags('Root')
@Controller()
export class AppController {
constructor(private readonly appService: AppService) { }
@Public()
@Get()
@ApiOperation({ summary: 'API Status' })
getStatus(@Req() req: any) {
return this.appService.getStatus(req);
}
@Public()
@Get('health')
getHealth(): { status: string; timestamp: string } {
return {
status: 'ok',
timestamp: new Date().toISOString(),
};
}
}