mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-06-16 04:35:24 +02:00
refactor: update environment invalidation logic in AdvancedEnvironmentSelector to use byProjectId, improving data consistency and clarity
This commit is contained in:
@@ -97,7 +97,7 @@ export const AdvancedEnvironmentSelector = ({
|
||||
});
|
||||
|
||||
toast.success("Environment created successfully");
|
||||
utils.project.one.invalidate({ projectId });
|
||||
utils.environment.byProjectId.invalidate({ projectId });
|
||||
setIsCreateDialogOpen(false);
|
||||
setName("");
|
||||
setDescription("");
|
||||
@@ -117,7 +117,7 @@ export const AdvancedEnvironmentSelector = ({
|
||||
});
|
||||
|
||||
toast.success("Environment updated successfully");
|
||||
utils.project.one.invalidate({ projectId });
|
||||
utils.environment.byProjectId.invalidate({ projectId });
|
||||
setIsEditDialogOpen(false);
|
||||
setSelectedEnvironment(null);
|
||||
setName("");
|
||||
@@ -136,7 +136,7 @@ export const AdvancedEnvironmentSelector = ({
|
||||
});
|
||||
|
||||
toast.success("Environment deleted successfully");
|
||||
utils.project.one.invalidate({ projectId });
|
||||
utils.environment.byProjectId.invalidate({ projectId });
|
||||
setIsDeleteDialogOpen(false);
|
||||
setSelectedEnvironment(null);
|
||||
|
||||
|
||||
@@ -42,7 +42,9 @@ export const buildDocker = async (
|
||||
await mechanizeDockerContainer(application);
|
||||
writeStream.write("\nDocker Deployed: ✅\n");
|
||||
} catch (error) {
|
||||
writeStream.write("❌ Error");
|
||||
writeStream.write(
|
||||
`❌ Error: ${error instanceof Error ? error.message : String(error)}`,
|
||||
);
|
||||
throw error;
|
||||
} finally {
|
||||
writeStream.end();
|
||||
|
||||
Reference in New Issue
Block a user