mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-23 23:48:56 +01:00
Add script for reading config
This commit is contained in:
parent
3db06eee3f
commit
2e4a56daa3
1 changed files with 11 additions and 0 deletions
11
views/scripts/readWriteConfig.js
Normal file
11
views/scripts/readWriteConfig.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
var showConfig = document.getElementById("show-config");
|
||||
showConfig.addEventListener("click", () => {
|
||||
fetch("/config")
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
for (let key in data) {
|
||||
console.log('key: ', key);
|
||||
console.log(data[key]);
|
||||
}
|
||||
});
|
||||
});
|
Loading…
Reference in a new issue