23 lines
506 B
TypeScript
23 lines
506 B
TypeScript
import { Controller, Get } from '@nestjs/common';
|
|
import { AppService } from './app.service';
|
|
import { Public } from './modules/auth/public.decorator';
|
|
|
|
@Controller()
|
|
export class AppController {
|
|
constructor(private readonly appService: AppService) {}
|
|
|
|
@Get()
|
|
getHello(): string {
|
|
return this.appService.getHello();
|
|
}
|
|
|
|
@Public()
|
|
@Get('health')
|
|
healthCheck(): { status: string; timestamp: string } {
|
|
return {
|
|
status: 'ok',
|
|
timestamp: new Date().toISOString(),
|
|
};
|
|
}
|
|
}
|