mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-27 23:17:43 +02:00
♻️ refactor: migrate 19 Matrix bots to shared HealthController
- All bots now use HealthController from @manacore/matrix-bot-common - Deleted 19 duplicate health.controller.ts files - Added IConfigService interface for @nestjs/config v3/v4 compatibility - matrix-stats-bot migrated to use BaseMatrixService as example - All 19 bots pass type-check This consolidation eliminates ~400 lines of duplicate health check code. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
145b0b6599
commit
83f2d63f56
62 changed files with 483 additions and 331 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import { Module } from '@nestjs/common';
|
||||
import { ConfigModule } from '@nestjs/config';
|
||||
import { HealthController, createHealthProvider } from '@manacore/matrix-bot-common';
|
||||
import { BotModule } from './bot/bot.module';
|
||||
import { HealthController } from './health.controller';
|
||||
import configuration from './config/configuration';
|
||||
|
||||
@Module({
|
||||
|
|
@ -13,5 +13,6 @@ import configuration from './config/configuration';
|
|||
BotModule,
|
||||
],
|
||||
controllers: [HealthController],
|
||||
providers: [createHealthProvider('matrix-clock-bot')],
|
||||
})
|
||||
export class AppModule {}
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
import { Controller, Get } from '@nestjs/common';
|
||||
|
||||
@Controller('health')
|
||||
export class HealthController {
|
||||
@Get()
|
||||
check() {
|
||||
return { status: 'ok', service: 'matrix-clock-bot' };
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue