Files
chaohua_coze/server/src/app.controller.ts

24 lines
507 B
TypeScript
Raw Normal View History

import { Controller, Get } from '@nestjs/common';
import { AppService } from '@/app.service';
@Controller()
export class AppController {
constructor(private readonly appService: AppService) {}
@Get('hello')
getHello(): { status: string; data: string } {
return {
status: 'success',
data: this.appService.getHello()
};
}
@Get('health')
getHealth(): { status: string; data: string } {
return {
status: 'success',
data: new Date().toISOString(),
};
}
}