[Modify user] Dealing with skynet emails

#1
This commit is contained in:
eoghan.conlon 2023-07-30 00:21:36 +01:00
parent 4a42f46089
commit c75f62f5e6

View file

@ -47,7 +47,12 @@
body: JSON.stringify(object)
}).then(res => {
if (res.status === 200) {
document.getElementById('formStatus').innerHTML = "<span style='background-color: green; color: white'>Success</span>";
let temp = res.json();
if(temp.result === 'error'){
document.getElementById('formStatus').innerHTML = `<span style='background-color: red; color: white'>${temp.error}</span>`;
} else {
document.getElementById('formStatus').innerHTML = "<span style='background-color: green; color: white'>Success</span>";
}
} else if (res.status === 500) {
document.getElementById('formStatus').innerHTML = "<span style='background-color: red; color: white'>Failure</span>";
} else {