mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 20:21:09 +02:00
add health route
This commit is contained in:
parent
952f246055
commit
b6115a63c7
4 changed files with 873 additions and 852 deletions
|
|
@ -8,6 +8,7 @@ import { CreditsModule } from './credits/credits.module';
|
|||
import { FeedbackModule } from './feedback/feedback.module';
|
||||
import { SettingsModule } from './settings/settings.module';
|
||||
import { AiModule } from './ai/ai.module';
|
||||
import { HealthModule } from './health/health.module';
|
||||
import { HttpExceptionFilter } from './common/filters/http-exception.filter';
|
||||
|
||||
@Module({
|
||||
|
|
@ -26,6 +27,7 @@ import { HttpExceptionFilter } from './common/filters/http-exception.filter';
|
|||
AuthModule,
|
||||
CreditsModule,
|
||||
FeedbackModule,
|
||||
HealthModule,
|
||||
SettingsModule,
|
||||
],
|
||||
providers: [
|
||||
|
|
|
|||
12
services/mana-core-auth/src/health/health.controller.ts
Normal file
12
services/mana-core-auth/src/health/health.controller.ts
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import { Controller, Get } from '@nestjs/common';
|
||||
|
||||
@Controller('api/v1/health')
|
||||
export class HealthController {
|
||||
@Get()
|
||||
check() {
|
||||
return {
|
||||
status: 'ok',
|
||||
timestamp: new Date().toISOString(),
|
||||
};
|
||||
}
|
||||
}
|
||||
7
services/mana-core-auth/src/health/health.module.ts
Normal file
7
services/mana-core-auth/src/health/health.module.ts
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import { Module } from '@nestjs/common';
|
||||
import { HealthController } from './health.controller';
|
||||
|
||||
@Module({
|
||||
controllers: [HealthController],
|
||||
})
|
||||
export class HealthModule {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue