mirror of
https://github.com/xfarrow/blink
synced 2025-06-27 09:03:02 +02:00
update frontend javascript
This commit is contained in:
@ -45,6 +45,7 @@
|
|||||||
|
|
||||||
if(!display_name || !email || !password){
|
if(!display_name || !email || !password){
|
||||||
alert('Please fill in all fields');
|
alert('Please fill in all fields');
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
|
@ -83,8 +83,12 @@
|
|||||||
populateFields(data.display_name, data.email);
|
populateFields(data.display_name, data.email);
|
||||||
document.body.style.display = 'block'; // Show page
|
document.body.style.display = 'block'; // Show page
|
||||||
}
|
}
|
||||||
|
else if (response.status == 401){
|
||||||
|
console.error(data.error);
|
||||||
|
window.location.href = 'login.html';
|
||||||
|
}
|
||||||
else{
|
else{
|
||||||
alert(data.error);
|
alert(`Unable to load profile. Error: ${data.error}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user