diff --git a/api-payroll/public/html/landing.php b/api-payroll/public/html/landing.php index b37d1e7..76b342a 100644 --- a/api-payroll/public/html/landing.php +++ b/api-payroll/public/html/landing.php @@ -238,4 +238,5 @@ if(!isset($_SESSION['userName'])){ + \ No newline at end of file diff --git a/api-payroll/public/html/login.php b/api-payroll/public/html/login.php index 5a30ce5..15a00e4 100644 --- a/api-payroll/public/html/login.php +++ b/api-payroll/public/html/login.php @@ -50,4 +50,5 @@ if(isset($_SESSION['userName'])){ + \ No newline at end of file diff --git a/api-payroll/public/js/getBaseUrl.js b/api-payroll/public/js/getBaseUrl.js new file mode 100644 index 0000000..0a26748 --- /dev/null +++ b/api-payroll/public/js/getBaseUrl.js @@ -0,0 +1,10 @@ +/** + * Returns the entry point url for the system, this url will be used + * to access both the api and the static resources + * + * @returns {string} + */ +function getbaseUrl(){ + var url = window.location.href; + return url.substring(0, url.indexOf('/html/')); +} \ No newline at end of file diff --git a/api-payroll/public/js/login.js b/api-payroll/public/js/login.js index bfc30e3..e0cd8a2 100644 --- a/api-payroll/public/js/login.js +++ b/api-payroll/public/js/login.js @@ -1,10 +1,5 @@ -function getbaseUrl(uriPath){ - var url = window.location.href; - return url.substring(0, url.indexOf(uriPath)); -} - function processLogin() { - var baseUrl = getbaseUrl('/html/'); + var baseUrl = getbaseUrl(); var parametros = { "userName":$('#userName').val(),