Fix URL for register in auth.js

This commit is contained in:
Fred Boniface 2023-04-05 21:25:28 +01:00
parent 8e079512cc
commit 29d293c77f

View File

@ -19,7 +19,7 @@ async function cmdOut(message) {
}
async function registerKey(key) { // Posts key to server and listens for response.
var url = `${window.location.origin}/api/v1/auth/register`;
var url = `${window.location.origin}/api/v1/register/register`;
let res = await fetch(url, { // The response will contain the UUID which will be registered
method: "POST",
headers: {
@ -29,6 +29,7 @@ async function registerKey(key) { // Posts key to server and listens for respons
body: JSON.stringify(key)
})
if (res.JSON['result'] == "ok"){
localStorage.setItem("uuid", res.JSON['uuid'])
return true;
} else {
return false;