fayzul_
06/09/2022, 12:30 PMfunction loginHandler(){
if (email == '' || password == ''){
console.log('Cant upload without variables')
} else {
fetch("http://127.0.0.1:8000/auth/signin", {
method: 'POST',
headers:{"Content-Type":"application/json"},
body:JSON.stringify( {
"formFields" : [
{
"id" : "email",
"value" : {email}
},
{
"id": "password",
"value": {password}
}
]
}
)})
.then(res => {
if (res.ok){
console.log('Signed In!')
} else {
console.log("Couldn't Sign In :(")
}
}).catch(console.log('Something is off'));
console.log('logging in')
console.log(email)
console.log(password)
rp_st
06/09/2022, 12:30 PMrp_st
06/09/2022, 12:31 PMrp_st
06/09/2022, 12:31 PMfayzul_
06/09/2022, 12:31 PMnkshah2
06/09/2022, 12:32 PM.catch(e => {console.log(e)})
And see what it prints out?fayzul_
06/09/2022, 4:47 PMfayzul_
06/09/2022, 4:47 PMfayzul_
06/09/2022, 7:51 PMfayzul_
06/09/2022, 7:52 PMfayzul_
06/09/2022, 7:52 PMfayzul_
06/09/2022, 7:57 PMnkshah2
06/10/2022, 4:00 AM