From c75f62f5e6deafdbc2bdf5d39a8fcfcbdde7d45e Mon Sep 17 00:00:00 2001 From: "eoghan.conlon" Date: Sun, 30 Jul 2023 00:21:36 +0100 Subject: [PATCH] [Modify user] Dealing with skynet emails #1 --- src/modify.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/modify.html b/src/modify.html index 59fc8dd..2f0f26a 100644 --- a/src/modify.html +++ b/src/modify.html @@ -47,7 +47,12 @@ body: JSON.stringify(object) }).then(res => { if (res.status === 200) { - document.getElementById('formStatus').innerHTML = "Success"; + let temp = res.json(); + if(temp.result === 'error'){ + document.getElementById('formStatus').innerHTML = `${temp.error}`; + } else { + document.getElementById('formStatus').innerHTML = "Success"; + } } else if (res.status === 500) { document.getElementById('formStatus').innerHTML = "Failure"; } else {