Upload apps/backend/src/api/routes/root.controller.ts with huggingface_hub
Browse files
apps/backend/src/api/routes/root.controller.ts
CHANGED
|
@@ -1,8 +1,18 @@
|
|
| 1 |
import { Controller, Get } from '@nestjs/common';
|
|
|
|
|
|
|
|
|
|
| 2 |
@Controller('/')
|
| 3 |
export class RootController {
|
| 4 |
@Get('/')
|
|
|
|
| 5 |
getRoot(): string {
|
| 6 |
return 'App is running!';
|
| 7 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
}
|
|
|
|
| 1 |
import { Controller, Get } from '@nestjs/common';
|
| 2 |
+
import { ApiTags, ApiOperation } from '@nestjs/swagger';
|
| 3 |
+
|
| 4 |
+
@ApiTags('Root')
|
| 5 |
@Controller('/')
|
| 6 |
export class RootController {
|
| 7 |
@Get('/')
|
| 8 |
+
@ApiOperation({ summary: 'Welcome page' })
|
| 9 |
getRoot(): string {
|
| 10 |
return 'App is running!';
|
| 11 |
}
|
| 12 |
+
|
| 13 |
+
@Get('/health')
|
| 14 |
+
@ApiOperation({ summary: 'Health check endpoint' })
|
| 15 |
+
getHealth() {
|
| 16 |
+
return { status: 'OK', timestamp: new Date().toISOString() };
|
| 17 |
+
}
|
| 18 |
}
|