feat: user settings map filter & reload

This commit is contained in:
2024-01-13 07:24:05 +01:00
parent 8258f57a09
commit 8690c3b7bc
3 changed files with 55 additions and 11 deletions

View File

@@ -32,14 +32,16 @@ function submit(e){
}
const s = e.target
console.log(s)
const json_data = JSON.stringify({ payload : [ { key : s.id, value : s.checked } ] })
console.log(json_data)
fetch("/update-user-settings", {
method: "POST",
credentials: "include",
headers: {'Content-Type': 'application/json'},
body: json_data
}
).then(response => {})
).then(response => {
if(s.id.startsWith("show")){
window.location.reload()
}
})
}