mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-20 19:02:03 +00:00
refactor: streamline error handling and notification logic across various components
This commit is contained in:
+2
-6
@@ -13,12 +13,8 @@ export const BackfillSecretReferenceSecretion = () => {
|
||||
|
||||
const handleBackfill = async () => {
|
||||
if (backfillSecretReferences.isPending) return;
|
||||
try {
|
||||
await backfillSecretReferences.mutateAsync({ projectId: currentProject.id || "" });
|
||||
createNotification({ text: "Successfully re-indexed secret references", type: "success" });
|
||||
} catch {
|
||||
createNotification({ text: "Failed to re-index secret references", type: "error" });
|
||||
}
|
||||
await backfillSecretReferences.mutateAsync({ projectId: currentProject.id || "" });
|
||||
createNotification({ text: "Successfully re-indexed secret references", type: "success" });
|
||||
};
|
||||
|
||||
const isAdmin = hasProjectRole(ProjectMembershipRole.Admin);
|
||||
|
||||
Reference in New Issue
Block a user