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.
This commit is contained in:
parent
3d67b8ad18
commit
0874ffb835
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user