From 0874ffb835ee8f3b8244871426a86296b0b7e075 Mon Sep 17 00:00:00 2001 From: Mathis Date: Thu, 10 Oct 2024 14:10:23 +0200 Subject: [PATCH] Implement machine list retrieval in controllers Add functionality to fetch and return a list of machines with limit, offset, and search parameters using the machineService. This enhances the controller's capability to handle queries more effectively. --- apps/backend/src/app/machines/machines.controller.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/backend/src/app/machines/machines.controller.ts b/apps/backend/src/app/machines/machines.controller.ts index dce7219..5348725 100644 --- a/apps/backend/src/app/machines/machines.controller.ts +++ b/apps/backend/src/app/machines/machines.controller.ts @@ -26,7 +26,9 @@ export class MachinesController { @Query("limit", new DefaultValuePipe(20), ParseIntPipe) limit: number, @Query("offset", new DefaultValuePipe(0), ParseIntPipe) offset: number, @Query("search", new DefaultValuePipe("")) search: string, - ) {} + ) { + return await this.machineService.findMany(limit, offset, search); + } //TODO DTO @UseGuards(AdminGuard)