client data toast
This commit is contained in:
@@ -15,7 +15,7 @@ const addState = connect(
|
|||||||
postData('/account/login', { name, password })
|
postData('/account/login', { name, password })
|
||||||
.then(res => res.json())
|
.then(res => res.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
if (!data.success) return errorToast(data.error_message);
|
if (data.error) return errorToast(data.error);
|
||||||
console.log(data.response);
|
console.log(data.response);
|
||||||
ws.connect();
|
ws.connect();
|
||||||
})
|
})
|
||||||
@@ -26,7 +26,7 @@ const addState = connect(
|
|||||||
postData('/account/register', { name, password, code })
|
postData('/account/register', { name, password, code })
|
||||||
.then(res => res.json())
|
.then(res => res.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
if (!data.success) return errorToast(data.error_message);
|
if (data.error) return errorToast(data.error);
|
||||||
console.log(data.response);
|
console.log(data.response);
|
||||||
ws.connect();
|
ws.connect();
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user