my check50 returns the following error:
:( /check route confirms whether username is available
route did not return true when username is available
Log
sending GET request to /check?username=check50student1
checking that status code 200 is returned...
my application has:
if (len(words) > 0):
return jsonify(result=False), 200
else:
return jsonify(result=True), 200
and my html has:
let input = document.querySelector('#username');
input.onkeyup = function() {
$.get('/check?q=' + input.value, function(data) {
//alert(data.result);
let html = '';
if (data.result === false) {
html += 'USERNAME TAKEN';
$('.checker').show();
document.getElementById("submit").addEventListener("click", function(event){
event.preventDefault()
});
}
document.querySelector('.checker').innerHTML = html;
});
};