Fixed registering
parent
8ea1299220
commit
dfe57f518a
|
@ -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',
|
||||||
|
|
Loading…
Reference in New Issue