flare / static /config.js
ciyidogan's picture
Create config.js
f8d9344 verified
raw
history blame
463 Bytes
function getConfig() {
apiGet('/config/get')
.then(data => {
document.getElementById('config-json').value = JSON.stringify(data, null, 2);
})
.catch(err => console.error(err));
}
function updateConfig() {
const config = JSON.parse(document.getElementById('config-json').value);
apiPost('/config/update', config)
.then(data => showResult('config-result', data))
.catch(err => console.error(err));
}