wrap converters in promises
This commit is contained in:
parent
7a9def556d
commit
a41e5d8c99
8 changed files with 70 additions and 57 deletions
|
|
@ -16,12 +16,10 @@ const main = document.querySelector("main");
|
|||
const progressElem = document.querySelector("progress");
|
||||
|
||||
const refreshData = () => {
|
||||
console.log("Refreshing data...");
|
||||
console.log(progressElem.value);
|
||||
console.log(progressElem.max);
|
||||
|
||||
if (progressElem.value !== progressElem.max) {
|
||||
fetch(`/progress/${jobId}`)
|
||||
fetch(`/progress/${jobId}`, {
|
||||
method: "POST",
|
||||
})
|
||||
.then((res) => res.text())
|
||||
.then((html) => {
|
||||
main.innerHTML = html;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue