client data toast
This commit is contained in:
parent
f84f458ebe
commit
bd51820279
@ -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();
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user