From d417fe636644011c895c1e7d3db41b2230d3581e Mon Sep 17 00:00:00 2001 From: Mahdi Date: Tue, 12 May 2026 17:28:02 +0330 Subject: [PATCH] mark booking query params optional in swagger --- src/modules/bookings/bookings.controller.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modules/bookings/bookings.controller.ts b/src/modules/bookings/bookings.controller.ts index 98a7880..08d8ede 100644 --- a/src/modules/bookings/bookings.controller.ts +++ b/src/modules/bookings/bookings.controller.ts @@ -9,6 +9,7 @@ import { Query, UseGuards, } from '@nestjs/common'; +import { ApiQuery } from '@nestjs/swagger'; import { BookingEntity, BookingStatus } from '../../entities/booking.entity'; import { UserRole } from '../../entities/user.entity'; import { AuthUser } from '../auth/auth.types'; @@ -27,6 +28,9 @@ export class BookingsController { @Get() @UseGuards(JwtAuthGuard, RolesGuard) @Roles(UserRole.ADMIN, UserRole.BUSINESS_OWNER, UserRole.CUSTOMER) + @ApiQuery({ name: 'customerId', required: false }) + @ApiQuery({ name: 'businessId', required: false }) + @ApiQuery({ name: 'status', required: false, enum: BookingStatus }) findAll( @Query('customerId') customerId?: string, @Query('businessId') businessId?: string,