From 38b6d1c3e9433bc281e3f8ce9631ae6778c8f776 Mon Sep 17 00:00:00 2001 From: nicolas Date: Mon, 7 Jun 2021 09:37:28 +0200 Subject: [PATCH] Properly get eventId --- pages/api/book/[user].ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pages/api/book/[user].ts b/pages/api/book/[user].ts index 7e8de525..65a509bd 100644 --- a/pages/api/book/[user].ts +++ b/pages/api/book/[user].ts @@ -49,7 +49,8 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse) const referencesToCreate = currentUser.credentials.length == 0 ? [] : [ { type: currentUser.credentials[0].type, - uid: result.id + // Get the eventId. The Google API does not return it somewhere elso, so we need do it like this: + uid: result.htmlLink.replace("https://www.google.com/calendar/event?eid=", "") } ];