foods pagination
This commit is contained in:
@@ -88,8 +88,9 @@ export class FoodController {
|
||||
@ApiQuery({ name: 'order', required: false, enum: ['asc', 'desc'] })
|
||||
@ApiQuery({ name: 'categoryId', required: false, type: String })
|
||||
@ApiQuery({ name: 'isActive', required: false, type: Boolean })
|
||||
findAll(@Query() dto: FindFoodsDto, @RestId() restId: string) {
|
||||
return this.foodsService.findAll(restId, dto);
|
||||
async findAll(@Query() dto: FindFoodsDto, @RestId() restId: string) {
|
||||
const result =await this.foodsService.findAll(restId, dto);
|
||||
return result;
|
||||
}
|
||||
|
||||
@UseGuards(AdminAuthGuard)
|
||||
|
||||
@@ -62,5 +62,7 @@ export class FoodRepository extends EntityRepository<Food> {
|
||||
totalPages,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user