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:
@@ -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);
|
||||||
|
|||||||
@@ -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")
|
||||||
|
|||||||
Reference in New Issue
Block a user