Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

Commit

Permalink
fixed guest login for availability
Browse files Browse the repository at this point in the history
  • Loading branch information
mirmirmirr committed Nov 29, 2024
1 parent 212a9ed commit 1f6fd02
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/pages/Availability.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,17 @@ export default function Availability() {
dataToUse['password'] = userPW;
} else {
if (guestEmail !== null && guestPW !== null) {
dataToUse['email'] = guestEmail;
dataToUse['password'] = guestPW;
dataToUse['guest_id'] = guestEmail;
dataToUse['guest_password'] = guestPW;
} else {
try {
const response = await fetch(
'http://tomeeto.cs.rpi.edu:8000/create_guest'
);
if (response.ok) {
const responseData = await response.json();
dataToUse['email'] = responseData.guest_id;
dataToUse['password'] = responseData.guest_password;
dataToUse['guest_id'] = responseData.guest_id;
dataToUse['guest_password'] = responseData.guest_password;
} else {
console.error(
'Failed to make guest:',
Expand Down

0 comments on commit 1f6fd02

Please sign in to comment.