mark booking query params optional in swagger
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user