adding api unit tests (#108)

* adding api unit tests

* adding not signed in alerts to flights and logs
This commit was merged in pull request #108.
This commit is contained in:
2026-03-08 14:58:24 -05:00
committed by GitHub
parent b7e74242b8
commit 487afb08d6
40 changed files with 1621 additions and 182 deletions

View File

@@ -1,27 +1,13 @@
import {
Controller,
Get,
HttpException,
HttpStatus,
} from '@nestjs/common';
import { HealthService } from './health.service';
import { CustomError } from 'src/error/customError';
@Controller('health')
export class HealthController {
constructor(
private readonly healthService: HealthService
) {}
@Get()
async isHealthy(): Promise<boolean> {
try {
return await this.healthService.isDatabaseConnected();
} catch (error) {
const customError = error as CustomError;
throw new HttpException(customError.message, customError.statusCode);
}
async isHealthy(): Promise<HttpStatus> {
return HttpStatus.OK
}
}