fix: Small fixes

This commit is contained in:
Andras Bacsai 2022-02-15 10:42:26 +01:00
parent 19d6be8663
commit f9a2232703
2 changed files with 2 additions and 6 deletions

View File

@ -96,10 +96,9 @@
async function update() { async function update() {
updateStatus.loading = true; updateStatus.loading = true;
// if (!dev) {
try { try {
await post(`/update.json`, { type: 'update', latestVersion }); await post(`/update.json`, { type: 'update', latestVersion });
toast.push('Update completed. Waiting for the new version to start...'); toast.push('Update completed.<br><br>Waiting for the new version to start...');
let reachable = false; let reachable = false;
let tries = 0; let tries = 0;
do { do {
@ -119,10 +118,9 @@
await asyncSleep(3000); await asyncSleep(3000);
return window.location.reload(); return window.location.reload();
} catch ({ error }) { } catch ({ error }) {
return errorNotification(error);
} finally {
updateStatus.success = false; updateStatus.success = false;
updateStatus.loading = false; updateStatus.loading = false;
return errorNotification(error);
} }
} }
</script> </script>

View File

@ -36,8 +36,6 @@ export const post: RequestHandler = async (event) => {
body: {} body: {}
}; };
} else { } else {
await asyncExecShell(`docker pull coollabsio/coolify:${latestVersion}`);
await asyncSleep(2000);
return { return {
status: 200, status: 200,
body: {} body: {}