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

@@ -60,12 +60,12 @@ export class LogController {
@Post()
@UseGuards(AuthGuard)
async create(@Body() logDto: LogDto): Promise<InsertResult> {
async create(@Body() logDto: LogDto) {
try {
return await this.logService.create(logDto);
} catch (error) {
const customError = error as CustomError;
console.log(error)
throw new HttpException(customError.message, customError.statusCode);
}
}
@@ -75,13 +75,12 @@ export class LogController {
async update(
@Param('id') id: string,
@Body() logDto: LogDto
): Promise<UpdateResult> {
) {
try {
console.log(logDto);
return await this.logService.update(id, logDto);
} catch (error) {
const customError = error as CustomError;
console.log(customError)
throw new HttpException(customError.message, customError.statusCode);
}
}