added backup apis and tests

This commit is contained in:
Gani Georgiev
2023-05-13 22:10:14 +03:00
parent 3b0f60fe15
commit e8b4a7eb26
104 changed files with 3192 additions and 1017 deletions

View File

@@ -82,14 +82,15 @@
confirmClose = false;
hide();
addSuccessToast(admin.$isNew ? "Successfully created admin." : "Successfully updated admin.");
dispatch("save", result);
if (ApiClient.authStore.model?.id === result.id) {
ApiClient.authStore.save(ApiClient.authStore.token, result);
}
dispatch("save", result);
})
.catch((err) => {
ApiClient.errorResponseHandler(err);
ApiClient.error(err);
})
.finally(() => {
isSaving = false;
@@ -111,7 +112,7 @@
dispatch("delete", admin);
})
.catch((err) => {
ApiClient.errorResponseHandler(err);
ApiClient.error(err);
});
});
}