mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-08 05:39:13 +00:00
Rename readWriteConfig to just config.js
This commit is contained in:
@@ -4,10 +4,10 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<button type="button" id="show-config">Show Config</button>
|
<button type="button" id="show-config">Show Config</button>
|
||||||
<form id="update-config" style="display: none;">
|
<form id="config-form" style="display: none;">
|
||||||
<h1 id="config-title"></h1>
|
<h1 id="config-title"></h1>
|
||||||
<h2>content-type</h2>
|
<h2>content-type</h2>
|
||||||
</form>
|
</form>
|
||||||
</body>
|
</body>
|
||||||
<script src="views/scripts/readWriteConfig.js"></script>
|
<script src="views/scripts/config.js"></script>
|
||||||
</html>
|
</html>
|
||||||
@@ -1,8 +1,10 @@
|
|||||||
var showConfig = document.getElementById("show-config");
|
var showConfig = document.getElementById("show-config");
|
||||||
|
var configForm = document.getElementById("config-form");
|
||||||
showConfig.addEventListener("click", () => {
|
showConfig.addEventListener("click", () => {
|
||||||
fetch("/config")
|
fetch("/config")
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
|
configForm.style.display = "block";
|
||||||
for (let key in data) {
|
for (let key in data) {
|
||||||
console.log('key: ', key);
|
console.log('key: ', key);
|
||||||
console.log(data[key]);
|
console.log(data[key]);
|
||||||
Reference in New Issue
Block a user