ensure propagation node is configured before attempting to sync

This commit is contained in:
liamcottle 2024-09-18 19:46:56 +12:00
commit 1504bec4dc
2 changed files with 12 additions and 2 deletions

View file

@ -406,11 +406,15 @@ export default {
// request sync
try {
await axios.get("/api/v1/lxmf/propagation-node/sync");
await this.updatePropagationNodeStatus();
} catch(e) {
DialogUtils.alert("Failed to sync propagation node");
const errorMessage = e.response?.data?.message ?? "Something went wrong. Try again later.";
DialogUtils.alert(errorMessage);
return;
}
// update propagation status
await this.updatePropagationNodeStatus();
// wait until sync has finished
const syncFinishedInterval = setInterval(() => {