fix: application state in UI

This commit is contained in:
Andras Bacsai 2022-03-02 21:01:25 +01:00
parent 6655fb182c
commit 8b8b45778d
2 changed files with 4 additions and 3 deletions

View File

@ -86,7 +86,7 @@
async function handleDeploySubmit() {
try {
const { buildId } = await post(`/applications/${id}/deploy.json`, { ...application });
return window.location.assign(`/applications/${id}/logs/build?buildId=${buildId}`);
return await goto(`/applications/${id}/logs/build?buildId=${buildId}`);
} catch ({ error }) {
return errorNotification(error);
}
@ -108,7 +108,7 @@
try {
loading = true;
await post(`/applications/${id}/stop.json`, {});
return window.location.reload();
isRunning = false;
} catch ({ error }) {
return errorNotification(error);
} finally {

View File

@ -51,9 +51,10 @@
build.took = data.builds[0].took;
build.since = data.builds[0].since;
}
return build;
});
return;
return window.location.reload();
} catch ({ error }) {
return errorNotification(error);
}