From eb829029ba18be273a923415e117f28bee05f4cc Mon Sep 17 00:00:00 2001 From: Rassmagin Alexander Date: Mon, 25 Nov 2024 10:58:34 +0300 Subject: [PATCH] sending geo on creation --- public/modules/handleEventsActions.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/public/modules/handleEventsActions.js b/public/modules/handleEventsActions.js index d9f3667..3b7d843 100644 --- a/public/modules/handleEventsActions.js +++ b/public/modules/handleEventsActions.js @@ -158,9 +158,9 @@ export async function handleCreateEventSubmit(event, pageToCome, navigate) { event_start: dateStart, event_end: dateEnd, category_id: categoryId, - latitude: latitude || null, - longitude: longitude || null, - zoom: zoom || null, + Latitude: latitude, + Longitude: longitude, + zoom: zoom, }; const json = JSON.stringify(userData); @@ -177,6 +177,7 @@ export async function handleCreateEventSubmit(event, pageToCome, navigate) { }; const path = '/events'; 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);