File tree Expand file tree Collapse file tree 1 file changed +3
-31
lines changed
Modules/Sources/Yosemite/Stores Expand file tree Collapse file tree 1 file changed +3
-31
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments