Skip to content

Commit 0a42465

Browse files
committed
Temporarily remove booking remote update call
1 parent 1100b05 commit 0a42465

File tree

1 file changed

+3
-31
lines changed

1 file changed

+3
-31
lines changed

Modules/Sources/Yosemite/Stores/BookingStore.swift

Lines changed: 3 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -267,37 +267,9 @@ private extension BookingStore {
267267
siteID: siteID,
268268
bookingID: bookingID,
269269
statusKey: status
270-
) { [weak self] previousStatusKey in
271-
guard let self else {
272-
return onCompletion(UpdateBookingStatusError.undefinedState)
273-
}
274-
275-
Task {
276-
do {
277-
if let remoteBooking = try await self.remote.updateBooking(
278-
from: siteID,
279-
bookingID: bookingID,
280-
attendanceStatus: status
281-
) {
282-
await self.upsertStoredBookingsInBackground(
283-
readOnlyBookings: [remoteBooking],
284-
readOnlyOrders: [],
285-
siteID: siteID
286-
)
287-
} else {
288-
onCompletion(nil)
289-
}
290-
} catch {
291-
/// Revert Optimistic Update
292-
self.updateBookingAttendanceStatusLocally(
293-
siteID: siteID,
294-
bookingID: bookingID,
295-
statusKey: previousStatusKey
296-
) { _ in
297-
onCompletion(error)
298-
}
299-
}
300-
}
270+
) { _ in
271+
//TODO: - booking status remote update + rollback status in case of error
272+
onCompletion(nil)
301273
}
302274
}
303275

0 commit comments

Comments
 (0)