send emails and confirm
This commit is contained in:
@@ -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;
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user