This commit is contained in:
Smigz 2025-04-06 06:07:02 -04:00
parent e89fb616e7
commit b1c295d2ac
12 changed files with 2783 additions and 55 deletions

View file

@ -0,0 +1,14 @@
console.log('form stuff');
const usernameCheck = async (username) => {
let res = await fetch(`/auth/username?username=${username}`);
return await res.json();
};
const input = document.querySelector("input[name='username']");
input.addEventListener('input', async (e) => {
let input = e.target.value;
let test = await usernameCheck(input);
test.results ? console.log('user exists') : console.log('user doesnt');
});