Skip to content

Commit

Permalink
ahh i broke things revert
Browse files Browse the repository at this point in the history
  • Loading branch information
JishnuS420 committed Nov 3, 2023
1 parent 4edd170 commit 54d0d8a
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions pages/signin.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,20 +97,13 @@ <h2>Sign In</h2>
fetch(login_url, authOptions)
.then(response => {
if (response.status === 401) {
alert("Bad password/username input");
alert("Incorrect email or password :( Please try again!");
console.log('Authentication failed');
return;
} else if (response.ok) {
// Successfully logged in, now set the email in a cookie
setCookie("email", emailInput.value, 1); // Set the email cookie for an hour
console.log('Successful fetch');
read_pull();
return;
}
else {
const errorMsg = 'Server returned an error: ' + response.status;
console.error(errorMsg);
alert("Uh oh, something went wrong :(");
}
})
.catch(error => {
Expand Down

0 comments on commit 54d0d8a

Please sign in to comment.