2023-09-13 19:56:58 +00:00
|
|
|
async function requestRegister() {
|
|
|
|
const account_information = {
|
|
|
|
username: qs("#username").value,
|
|
|
|
password: qs("#password").value,
|
|
|
|
};
|
|
|
|
|
2023-11-08 10:08:40 +00:00
|
|
|
const account_response = await request("/register", "POST", account_information);
|
2023-09-13 19:56:58 +00:00
|
|
|
|
|
|
|
// Check response for errors
|
|
|
|
|
|
|
|
// If success, return to account
|
|
|
|
console.log(account_response);
|
|
|
|
|
|
|
|
if (account_response.body.success) {
|
|
|
|
location.href = "/login";
|
|
|
|
}
|
|
|
|
}
|