Skip to content

Commit

Permalink
sending geo on creation2
Browse files Browse the repository at this point in the history
  • Loading branch information
Ko71k committed Nov 25, 2024
1 parent eb82902 commit db3f587
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion public/modules/handleEventsActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit db3f587

Please sign in to comment.