This repository has been archived by the owner on Dec 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bd62f59
commit f13ecb8
Showing
2 changed files
with
3 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -153,8 +153,6 @@ export default function CreateEvent() { | |
|
||
const get_event_data = async () => { | ||
const data = { | ||
// email: '[email protected]', | ||
// password: '123', | ||
title: eventName, | ||
description: eventDescription, | ||
duration: parseInt(selectedInterval), | ||
|
@@ -164,7 +162,6 @@ export default function CreateEvent() { | |
|
||
const cookies = document.cookie; // Get all cookies as a single string | ||
const cookieObj = {}; | ||
console.log('Ran here 1'); | ||
|
||
cookies.split(';').forEach((cookie) => { | ||
const [key, value] = cookie.split('=').map((part) => part.trim()); | ||
|
@@ -212,8 +209,6 @@ export default function CreateEvent() { | |
} | ||
} | ||
|
||
console.log('data sent:', data); | ||
|
||
if (selectDaysOfWeek) { | ||
data.event_type = 'generic_week'; | ||
data.start_day = selectedStartDay.toLowerCase(); | ||
|
@@ -222,13 +217,8 @@ export default function CreateEvent() { | |
data.event_type = 'date_range'; | ||
data.start_date = startCalendarDay; | ||
data.end_date = endCalendarDay; | ||
console.log(data.start_date); | ||
console.log(data.end_date); | ||
} | ||
|
||
console.log(data); | ||
console.log('works'); | ||
|
||
try { | ||
const response = await fetch( | ||
'http://tomeeto.cs.rpi.edu:8000/create_event', | ||
|
@@ -243,11 +233,8 @@ export default function CreateEvent() { | |
|
||
if (response.ok) { | ||
const responseData = await response.json(); | ||
console.log('Response Data:', responseData); | ||
console.log(responseData); | ||
|
||
if (responseData.message != 'Event created') { | ||
console.log('ERROR'); | ||
handleError(responseData.message); | ||
return; | ||
} | ||
|