fix: booking paid trigger

This commit is contained in:
ghost2023
2026-07-02 16:18:46 +03:00
parent 4098b5476f
commit 79c3293a72
2 changed files with 43 additions and 36 deletions

View File

@@ -5,6 +5,7 @@ import {
Injectable,
Logger,
} from "@nestjs/common";
import { OnEvent } from "@nestjs/event-emitter";
import { Freight } from "@edr/types";
import { DataSource, EntityManager } from "typeorm";
@@ -94,6 +95,7 @@ export class BookingInvoiceService {
* reactions live here (not in the payment process): each invoice type advances
* the booking its own way. Only PREPAID exists today.
*/
@OnEvent("booking.invoice.paid")
async onBookingInvoicePaid(payload: InvoiceEventPayload): Promise<void> {
this.logger.log(
`onBookingInvoicePaid trigger for ${payload.sourceId} from ${payload.invoiceId}`,