Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- submitHandler: function () {
- /********* GET USER TOKEN WITH AJAX REQUEST**********/
- $.ajax({
- method: 'POST',
- url: "url for get token",
- data: {
- username: $('#email-log').val(),
- password: $('#password-log').val()
- },
- success: function (response) {
- if(response.d == true) {
- localStorage["username"] = $('#username-log').val();
- localStorage["user_token"] = response['token'];
- window.location = "{{url_for('maps')}}";
- }
- },
- });
- },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement