mirror of
https://github.com/arc53/DocsGPT
synced 2024-11-09 19:10:53 +00:00
16 lines
458 B
JavaScript
16 lines
458 B
JavaScript
document.getElementById("select-docs").addEventListener("change", function() {
|
|
localStorage.setItem('activeDocs', this.value)
|
|
fetch('/api/docs_check', {
|
|
method: 'POST',
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
},
|
|
body: JSON.stringify({docs: this.value}),
|
|
}).then(response => response.json()).then(
|
|
data => {
|
|
console.log('Success:', data);
|
|
}
|
|
)
|
|
});
|
|
|