From ed65a99b5cc6eaa911be6a8b33bbd59f597cb3d0 Mon Sep 17 00:00:00 2001 From: kamaldeen Aliyu <133337507+Nanafancy@users.noreply.github.com> Date: Mon, 1 Jun 2026 10:20:57 +0100 Subject: [PATCH 1/2] implemented the health check --- backend/src/opsce/health/healthController.ts | 4 ++++ backend/src/opsce/health/healthModule.ts | 11 +++++++++++ backend/src/opsce/health/healthSerivce.ts | 8 ++++++++ 3 files changed, 23 insertions(+) create mode 100644 backend/src/opsce/health/healthController.ts create mode 100644 backend/src/opsce/health/healthModule.ts create mode 100644 backend/src/opsce/health/healthSerivce.ts diff --git a/backend/src/opsce/health/healthController.ts b/backend/src/opsce/health/healthController.ts new file mode 100644 index 00000000..4920dea3 --- /dev/null +++ b/backend/src/opsce/health/healthController.ts @@ -0,0 +1,4 @@ + + + +export class healthController {} \ No newline at end of file diff --git a/backend/src/opsce/health/healthModule.ts b/backend/src/opsce/health/healthModule.ts new file mode 100644 index 00000000..1e5b68e2 --- /dev/null +++ b/backend/src/opsce/health/healthModule.ts @@ -0,0 +1,11 @@ +import { Module } from '@nestjs/common'; +import { TypeOrmModule } from '@nestjs/typeorm'; +import { AuditLog } from './entities/audit-log.entity'; +import { AuditService } from './audit.service'; + +@Module({ + imports: [TypeOrmModule.forFeature([])], + providers: [HealthService], + exports: [HealthService, TypeOrmModule], +}) +export class HealthModule {} diff --git a/backend/src/opsce/health/healthSerivce.ts b/backend/src/opsce/health/healthSerivce.ts new file mode 100644 index 00000000..19921615 --- /dev/null +++ b/backend/src/opsce/health/healthSerivce.ts @@ -0,0 +1,8 @@ + + +@Injectable() +export class HealthService { + getHealthStatus(): string { + return 'OK'; + } +} \ No newline at end of file From 144b9e1283d74a45b1d26f820cc844b3c67e480c Mon Sep 17 00:00:00 2001 From: kamaldeen Aliyu <133337507+Nanafancy@users.noreply.github.com> Date: Mon, 1 Jun 2026 10:22:08 +0100 Subject: [PATCH 2/2] health check --- backend/src/opsce/health/healthController.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/backend/src/opsce/health/healthController.ts b/backend/src/opsce/health/healthController.ts index 4920dea3..ab5b2c22 100644 --- a/backend/src/opsce/health/healthController.ts +++ b/backend/src/opsce/health/healthController.ts @@ -1,4 +1,11 @@ -export class healthController {} \ No newline at end of file +export class healthController { + constructor(private readonly healthService: HealthService) {} + + @Get() + getHealth(): string { + return this.healthService.getHealthStatus(); + } +} \ No newline at end of file