Departure station added to package bookings, and other fixes

This commit is contained in:
Stephanos A
2026-07-05 19:17:55 +03:00
parent afd30c36a0
commit 21122069a5
8 changed files with 106 additions and 26 deletions

View File

@@ -91,6 +91,15 @@ export class PackagesController {
return this.service.getBookingByRef(ref);
}
@Post('book')
@IsPublic()
@UseGuards(OptionalJwtGuard)
@ApiBearerAuth('JWT-auth')
@ApiOperation({ summary: 'Book a package (public or authenticated)' })
book(@Body() dto: BookPackageDto, @Request() req: any) {
return this.service.book(dto, req.user?.passengerId);
}
@Get(':id/booking-context')
@IsPublic()
@ApiOperation({ summary: 'Get booking context for self-service package booking' })
@@ -177,12 +186,4 @@ export class PackagesController {
return this.service.deleteTier(tierId);
}
@Post('book')
@IsPublic()
@UseGuards(OptionalJwtGuard)
@ApiBearerAuth('JWT-auth')
@ApiOperation({ summary: 'Book a package (public or authenticated)' })
book(@Body() dto: BookPackageDto, @Request() req: any) {
return this.service.book(dto, req.user?.passengerId);
}
}