feat(bookings): Implement document upload API for DRAFT bookings

This commit is contained in:
ghost2023
2026-06-05 09:47:46 +03:00
parent c7617b1b6e
commit c5859dba6c
2 changed files with 27 additions and 0 deletions

View File

@@ -147,6 +147,18 @@ export class BookingsController {
return this.bookingsService.remove(id);
}
@Post(':id/documents')
@UseInterceptors(AnyFilesInterceptor())
@ApiConsumes('multipart/form-data')
@ApiOperation({ summary: 'Upload documents for a booking (DRAFT only)' })
async uploadDocuments(
@Param('id', ParseUUIDPipe) id: string,
@UploadedFiles() files: Express.Multer.File[],
) {
const booking = await this.bookingsService.uploadDocuments(id, files ?? []);
return this.transitionService.enrichBookingResponse(booking);
}
@Post(':id/generate-price')
@ApiOperation({ summary: 'Generate price preview (DRAFT only)' })
@ApiOkResponse({ type: GeneratePriceResponseDto })