Merged in fix/SW-2508-new-api-cancel-booking-contract (pull request #1906)
Ending up doing some extra things: Consolidated booking queries: We had both cancel and cancelMany, but functionally they’re the same, only one accepts an array and the other doesn’t. Didn’t see much point in keeping the single cancel as it wasn’t used anywhere. Thus, I could rename cancelMany to be the one stop method. remove method for API now properly supports body so we don’t have to hijack the typing in certain places * fix(SW-2508): now sending additional params to cancel api for new contract Approved-by: Niclas Edenvin
This commit is contained in:
committed by
Niclas Edenvin
parent
f0dbf294d8
commit
43bdd80dff
@@ -40,7 +40,7 @@ export default function FinalConfirmation({
|
||||
defaultMessage: "We’re sorry that things didn’t work out.",
|
||||
})
|
||||
|
||||
const cancelBookingsMutation = trpc.booking.cancelMany.useMutation({
|
||||
const cancelBookingsMutation = trpc.booking.cancel.useMutation({
|
||||
onSuccess(data, variables) {
|
||||
const allCancellationsWentThrough = data.every((cancelled) => cancelled)
|
||||
if (allCancellationsWentThrough) {
|
||||
|
||||
Reference in New Issue
Block a user