From db3f587556702b35b72de6615965e194186aa9fc Mon Sep 17 00:00:00 2001 From: Rassmagin Alexander Date: Mon, 25 Nov 2024 11:01:38 +0300 Subject: [PATCH] sending geo on creation2 --- public/modules/handleEventsActions.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/modules/handleEventsActions.js b/public/modules/handleEventsActions.js index 3b7d843..b050426 100644 --- a/public/modules/handleEventsActions.js +++ b/public/modules/handleEventsActions.js @@ -176,13 +176,15 @@ export async function handleCreateEventSubmit(event, pageToCome, navigate) { body: body, }; const path = '/events'; + console.log(request); const response = await api.post(path, request); - console.log(response); + // If response is not OK, throw error if (!response.ok) { throw new Error(data.message); } const data = await response.json(); + console.log(data); if (data.code) { throw new Error(data.message); }