Rename readWriteConfig to just config.js

This commit is contained in:
Saba
2021-11-27 10:52:54 -05:00
parent 2e4a56daa3
commit fa15d8dcf6
2 changed files with 4 additions and 2 deletions

13
views/scripts/config.js Normal file
View File

@@ -0,0 +1,13 @@
var showConfig = document.getElementById("show-config");
var configForm = document.getElementById("config-form");
showConfig.addEventListener("click", () => {
fetch("/config")
.then(response => response.json())
.then(data => {
configForm.style.display = "block";
for (let key in data) {
console.log('key: ', key);
console.log(data[key]);
}
});
});