Testing request url change

This commit is contained in:
Tristan Ancelet 2023-05-15 16:55:42 -05:00
parent 6194dda84a
commit 396f418350

12
main.js
View File

@ -1,5 +1,5 @@
function setDatabaseVersion() {
url = 'http://localhost:8000/api/database_version.php';
url = '/api/database_version.php';
response = makeRequest(url);
setInfoSection(response);
}
@ -13,7 +13,7 @@ function makeRequest(url){
}
function setCrontabStats(){
url = "http://localhost:8000/api/crontab_stats.php";
url = "/api/crontab_stats.php";
response = makeRequest(url);
setInfoSection(response);
}
@ -24,19 +24,19 @@ function setInfoSection (string) {
}
function getTable(name){
url = "http://localhost:8000/api/table.php?name=" + name;
url = "/api/table.php?name=" + name;
response = makeRequest(url);
setInfoSection(response);
}
function getCrontabs (){
url = "http://localhost:8000/api/table.php?name='crontabs'&columns=crontab_path,crontab_created_timestamp,crontab_modified_timestamp";
url = "/api/table.php?name='crontabs'&columns=crontab_path,crontab_created_timestamp,crontab_modified_timestamp";
response = makeRequest(url);
setInfoSection(response);
}
function test (){
url = "http://localhost:8000/api/crontab_view.php?name=0hourly";
url = "/api/crontab_view.php?name=0hourly";
response = makeRequest(url);
setInfoSection(response);
}
@ -45,4 +45,4 @@ function triggerPopup(info_to_get){
const modal = document.querySelector('dialog');
document.querySelector("#popup_button").addEventListener("click", () => {modal.showModal();});
}
}