send emails and confirm

This commit is contained in:
ntr
2019-08-26 00:40:33 +10:00
parent df1ccdb8cd
commit b75edcda66
7 changed files with 92 additions and 62 deletions
+2 -2
View File
@@ -21,7 +21,7 @@ const addState = connect(
postData('/account/password', { current, password })
.then(res => res.json())
.then(data => {
if (!data.success) return errorToast(data.error_message);
if (data.error) return errorToast(data.error);
infoToast('Password changed. Reloading...')
setTimeout(() => window.location.reload(), 5000);
})
@@ -32,7 +32,7 @@ const addState = connect(
postData('/account/email', { email })
.then(res => res.json())
.then(data => {
if (!data.success) return errorToast(data.error_message);
if (data.error) return errorToast(data.error);
infoToast('Email set. Please confirm your address.');
return true;
})