From 9c3eea525753d99639296d7353c7a941a301b959 Mon Sep 17 00:00:00 2001 From: Malte Delfs Date: Thu, 24 Jun 2021 20:41:26 +0200 Subject: [PATCH] booking hotfix --- pages/[user]/book.tsx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pages/[user]/book.tsx b/pages/[user]/book.tsx index 0266ef62..b44a91f8 100644 --- a/pages/[user]/book.tsx +++ b/pages/[user]/book.tsx @@ -101,7 +101,8 @@ export default function Book(props) { } telemetry.withJitsu(jitsu => jitsu.track(telemetryEventTypes.bookingConfirmed, collectPageParameters())); - const res = await fetch( + + /*const res = await */fetch( '/api/book/' + user, { body: JSON.stringify(payload), @@ -111,8 +112,8 @@ export default function Book(props) { method: 'POST' } ); - - if (res.ok) { + // TODO When the endpoint is fixed, change this to await the result again + //if (res.ok) { let successUrl = `/success?date=${date}&type=${props.eventType.id}&user=${props.user.username}&reschedule=${!!rescheduleUid}&name=${payload.name}`; if (payload['location']) { if (payload['location'].includes('integration')) { @@ -124,10 +125,10 @@ export default function Book(props) { } await router.push(successUrl); - } else { + /*} else { setLoading(false); setError(true); - } + }*/ } event.preventDefault();