Fixed registering

main
Luna 2021-07-26 16:33:22 -07:00
parent 8ea1299220
commit dfe57f518a
1 changed files with 2 additions and 2 deletions

View File

@ -52,7 +52,7 @@ form.addEventListener("submit", async function (event) {
//CHECKS IF A USERNAME IS TAKEN //CHECKS IF A USERNAME IS TAKEN
async function isUnameTaken() { async function isUnameTaken() {
const response = await fetch(`api/users/${uname}/`); const response = await fetch(`../api/users/${uname}/`);
const isTaken = await response.json(); const isTaken = await response.json();
//YES THIS IS CONFUSING I KNOW. //YES THIS IS CONFUSING I KNOW.
@ -67,7 +67,7 @@ async function isUnameTaken() {
async function register() { async function register() {
let sendRegisterInfo = { "name": uname, "pin": pin, "pronouns": pronouns } let sendRegisterInfo = { "name": uname, "pin": pin, "pronouns": pronouns }
const response = await fetch('/api/register/', { const response = await fetch('../api/register/', {
method: 'POST', method: 'POST',
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',