wip
This commit is contained in:
@@ -12,11 +12,9 @@ const addState = connect(
|
||||
} = state;
|
||||
function submitLogin(name, password) {
|
||||
postData('/login', { name, password })
|
||||
.then(res => {
|
||||
if (!res.ok) return errorToast(res);
|
||||
res.text()
|
||||
})
|
||||
.then(res => {
|
||||
.then(res => res.json())
|
||||
.then(data => {
|
||||
if (!data.success) return errorToast(data.error_message);
|
||||
ws.connect();
|
||||
})
|
||||
.catch(error => errorToast(error));
|
||||
|
||||
Reference in New Issue
Block a user