Merge pull request 'feat: fixed midtrans' (#69) from fix/bug-firman into development
continuous-integration/drone/tag Build is passing
Details
continuous-integration/drone/tag Build is passing
Details
Reviewed-on: #69pull/70/head^2 20.1.34-alpha.2
commit
ff44be66e2
|
@ -99,7 +99,7 @@ export class ChangeStatusBookingHandler
|
|||
});
|
||||
mappingTransaction(booking);
|
||||
|
||||
console.log({ dataID, couchData, booking });
|
||||
console.log('change status', { dataID, couchData, booking });
|
||||
|
||||
if (!couchData) {
|
||||
console.log('save data to couch');
|
||||
|
@ -134,18 +134,18 @@ export class BookingUpdateHandler
|
|||
|
||||
async handle(event: TransactionUpdatedEvent) {
|
||||
const data = event.data.data;
|
||||
const dataID = data?.id;
|
||||
const dataID = data?.id ?? data?.order_id;
|
||||
|
||||
const couchData = await this.couchService.getDoc(dataID, 'booking');
|
||||
|
||||
console.log('update', { dataID, couchData });
|
||||
if (couchData) {
|
||||
const booking = await this.bookingService.getOneByOptions({
|
||||
where: {
|
||||
id: data.id,
|
||||
id: dataID,
|
||||
},
|
||||
relations: ['items'],
|
||||
});
|
||||
|
||||
console.log({ booking });
|
||||
mappingTransaction(booking);
|
||||
await this.couchService.updateDoc(
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue