This commit is contained in:
2025-11-19 00:55:09 +03:30
parent bf5b50a3a2
commit f97e95bca6
3 changed files with 9 additions and 6 deletions
@@ -13,13 +13,15 @@ import {
ApiQuery,
ApiBody,
ApiParam,
ApiBearerAuth,
} from '@nestjs/swagger';
import { AdminAuthGuard } from 'src/modules/auth/guards/adminAuth.guard';
import { RestId } from 'src/common/decorators';
@UseGuards(AdminAuthGuard)
@ApiTags('foods')
@Controller('foods')
@ApiBearerAuth()
@ApiTags('admin/foods')
@Controller('admin/foods')
export class FoodController {
constructor(private readonly foodsService: FoodService) {}
@@ -41,7 +43,7 @@ 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) {
findAll(@Query() dto: FindFoodsDto, @RestId() restId: string) {
return this.foodsService.findAll(restId, dto);
}