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.
This commit is contained in:
Mathis H (Avnyr) 2024-10-21 14:51:13 +02:00
parent 30706118a8
commit 2d6815efb6
Signed by: Mathis
GPG Key ID: DD9E0666A747D126
2 changed files with 3 additions and 2 deletions

View File

@ -203,7 +203,7 @@ export class FilesController {
return await this.filesService.removeFileType(typeId); return await this.filesService.removeFileType(typeId);
} }
@HttpCode(HttpStatus.FOUND) @HttpCode(HttpStatus.OK)
@Get(":fileId") @Get(":fileId")
async getFile(@Param("fileId") fileId: string) { async getFile(@Param("fileId") fileId: string) {
return await this.filesService.get(fileId); return await this.filesService.get(fileId);

View File

@ -19,7 +19,8 @@ import {
TypeDto, TypeDto,
} from "apps/backend/src/app/machines/machines.dto"; } from "apps/backend/src/app/machines/machines.dto";
import { MachinesService } from "apps/backend/src/app/machines/machines.service"; 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') @ApiTags('Machines')
@Controller("machines") @Controller("machines")