diff --git a/apps/backend/src/app/machines/machines.controller.ts b/apps/backend/src/app/machines/machines.controller.ts index e70fda9..c1856a7 100644 --- a/apps/backend/src/app/machines/machines.controller.ts +++ b/apps/backend/src/app/machines/machines.controller.ts @@ -3,6 +3,8 @@ import { DefaultValuePipe, Delete, Get, + HttpCode, + HttpStatus, Param, ParseBoolPipe, ParseIntPipe, @@ -37,11 +39,19 @@ export class MachinesController { //TODO CRUD fileType associated to machine + @HttpCode(HttpStatus.OK) @Get("files/:machineId") async getFilesForMachine( @Query("limit", new DefaultValuePipe(20), ParseIntPipe) limit: number, @Query("offset", new DefaultValuePipe(0), ParseIntPipe) offset: number, @Query("search", new DefaultValuePipe("")) search: string, @Param("machineId") machineId: string, - ) {} + ) { + return this.machineService.findFilesForMachine( + limit, + offset, + search, + machineId, + ); + } }