Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const logIn = (email, password) => {
- $.post(server_addr + '/login', {
- email: email,
- password: password
- }, (data) => {
- authToken = data.token;
- $('#userName').html(data.user.name);
- $('#regLogIn').hide();
- $('#afterLogIn').show();
- connectWebSocket(data.user._id);
- }).fail((error) => {
- let msg = JSON.parse(error.responseText)['message'];
- dialog.showErrorBox('Login Failed!', msg);
- });
- };
Add Comment
Please, Sign In to add comment