Commit 33f014c2 authored by Deep Dey's avatar Deep Dey

update base url

parent b121299f
const BASE_URL = 'https://adm.lamartiniere.co/webomagic-user/v1'; // const BASE_URL = 'https://adm.lamartiniere.co/webomagic-user/v1';
const BASE_URL_LAMARTIN = 'https://adm.lamartiniere.co/webomagic-lamartin'; const BASE_URL_LAMARTIN = 'https://adm.lamartiniere.co/webomagic-lamartin';
\ No newline at end of file
...@@ -6,7 +6,7 @@ $(document).ready(function () { ...@@ -6,7 +6,7 @@ $(document).ready(function () {
var password = $('#password').val(); var password = $('#password').val();
$.ajax({ $.ajax({
url: BASE_URL + '/user/login', url: BASE_URL_LAMARTIN + '/user/login',
type: 'POST', type: 'POST',
contentType: 'application/json', contentType: 'application/json',
dataType: 'json', dataType: 'json',
...@@ -15,8 +15,9 @@ $(document).ready(function () { ...@@ -15,8 +15,9 @@ $(document).ready(function () {
password: password, password: password,
}), }),
success: function (response) { success: function (response) {
debugger
$('#errorMessage').hide(); $('#errorMessage').hide();
sessionStorage.setItem('loginData', JSON.stringify(response.data)); sessionStorage.setItem('loginData', JSON.stringify({apiKey: response.data}));
window.location.href = 'dashboard.html'; window.location.href = 'dashboard.html';
}, },
error: function (error) { error: function (error) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment