From 2d6815efb6dbb554db35503fb7f3221b149c6ebb Mon Sep 17 00:00:00 2001 From: Mathis Date: Mon, 21 Oct 2024 14:51:13 +0200 Subject: [PATCH] Update HTTP status code and import statements Changed HTTP status code from FOUND to OK in files.controller.ts for better clarity. Added ApiResponse and IMachinesTable imports to machines.controller.ts to enhance API documentation and type checking. --- apps/backend/src/app/files/files.controller.ts | 2 +- apps/backend/src/app/machines/machines.controller.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/backend/src/app/files/files.controller.ts b/apps/backend/src/app/files/files.controller.ts index 53002dd..777af7c 100644 --- a/apps/backend/src/app/files/files.controller.ts +++ b/apps/backend/src/app/files/files.controller.ts @@ -203,7 +203,7 @@ export class FilesController { return await this.filesService.removeFileType(typeId); } - @HttpCode(HttpStatus.FOUND) + @HttpCode(HttpStatus.OK) @Get(":fileId") async getFile(@Param("fileId") fileId: string) { return await this.filesService.get(fileId); diff --git a/apps/backend/src/app/machines/machines.controller.ts b/apps/backend/src/app/machines/machines.controller.ts index 48e4365..8d72d7b 100644 --- a/apps/backend/src/app/machines/machines.controller.ts +++ b/apps/backend/src/app/machines/machines.controller.ts @@ -19,7 +19,8 @@ import { TypeDto, } from "apps/backend/src/app/machines/machines.dto"; import { MachinesService } from "apps/backend/src/app/machines/machines.service"; -import { ApiTags } from '@nestjs/swagger'; +import { ApiResponse, ApiTags } from '@nestjs/swagger'; +import { IMachinesTable } from 'apps/backend/src/app/db/schema'; @ApiTags('Machines') @Controller("machines")