diff --git a/Software/MainBoard/rust/src_webpack/src/main.ts b/Software/MainBoard/rust/src_webpack/src/main.ts index 7af0067..bb8ad59 100644 --- a/Software/MainBoard/rust/src_webpack/src/main.ts +++ b/Software/MainBoard/rust/src_webpack/src/main.ts @@ -235,16 +235,21 @@ export class Controller { method: "POST", body: json, }) - .then(response => response.text()) - .then(text => statusCallback(text)) - .then(_ => { - controller.progressview.removeProgress("set_config"); - setTimeout(() => { - controller.downloadConfig().then(r => { - controller.updateSaveList().then(r => { + .then(async response => { + let text = response.text(); + statusCallback(await text) + return response.status + }) + .then(status => { + if (status == 200) { + controller.progressview.removeProgress("set_config"); + setTimeout(() => { + controller.downloadConfig().then(r => { + controller.updateSaveList().then(r => { + }); }); - }); - }, 250) + }, 250) + } }) }