fix non-returning promise warning
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
const { fetchAllBookings, bulkWriteReservationsWithChangesTracking } = require('../officeRnD/bookings');
|
||||
|
||||
const { chargeBookingChanges } = require('./bookingChangeCharges');
|
||||
const { getIncidentsFromChanges, bulkWriteBookingChangeIncidents } = require('./bookingChangeCharges');
|
||||
const { bulkWriteChanges } = require('./bookingChangeLog');
|
||||
|
||||
const checkBookingChanges = () => {
|
||||
@@ -13,9 +13,11 @@ const checkBookingChanges = () => {
|
||||
.then((changes) => {
|
||||
bulkWriteChanges(changes)
|
||||
.then(() => {
|
||||
chargeBookingChanges(changes)
|
||||
.then(() => {
|
||||
resolve(true);
|
||||
getIncidentsFromChanges(changes)
|
||||
.then((incidents) => {
|
||||
bulkWriteBookingChangeIncidents(incidents)
|
||||
.then(() => resolve(true))
|
||||
.catch((error) => reject(error));
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log('Error creating charges ', error);
|
||||
|
||||
Reference in New Issue
Block a user