Push dev work to master #2

Merged
sixteenmillimeter merged 416 commits from dev into master 2018-07-19 15:29:02 +00:00
1 changed files with 5 additions and 9 deletions
Showing only changes of commit 58d173da75 - Show all commits

View File

@ -411,18 +411,14 @@
};
web.setDir = function () {
const dir = document.getElementById('dir').checked;
/*$.ajax({
method : 'POST',
url : '/dir',
data : JSON.stringify({ dir : dir}),
contentType: 'application/json',
dataType : 'json',
success : web.setDirSuccess
});*/
const formData = new FormData()
console.log('set to => ' + dir)
formData.append('json', JSON.stringify({ dir : dir }))
const opts = {
method : 'POST',
body : { dir : dir}
body : formData
};
console.dir(opts)
fetch('/dir', opts)
.then(res => {
return res.json()