Compare commits
2 Commits
developmen
...
fix/bug-fi
Author | SHA1 | Date |
---|---|---|
|
7c0df75670 | |
|
50aca761f2 |
|
@ -97,12 +97,9 @@ export class ChangeStatusBookingHandler
|
|||
},
|
||||
relations: ['items'],
|
||||
});
|
||||
console.log('change status', { dataID, couchData, booking });
|
||||
mappingTransaction(booking);
|
||||
console.log('after mapping');
|
||||
|
||||
if (!couchData) {
|
||||
console.log('save data to couch');
|
||||
await this.couchService.createDoc(
|
||||
{
|
||||
_id: booking.id,
|
||||
|
@ -111,7 +108,6 @@ export class ChangeStatusBookingHandler
|
|||
'booking',
|
||||
);
|
||||
} else {
|
||||
console.log('update data to couch');
|
||||
await this.couchService.updateDoc(
|
||||
{
|
||||
_id: booking.id,
|
||||
|
@ -137,7 +133,6 @@ export class BookingUpdateHandler
|
|||
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: {
|
||||
|
@ -145,7 +140,6 @@ export class BookingUpdateHandler
|
|||
},
|
||||
relations: ['items'],
|
||||
});
|
||||
console.log({ booking });
|
||||
mappingTransaction(booking);
|
||||
await this.couchService.updateDoc(
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue