mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-09-14 11:06:15 +05:00
refactor: update environment invalidation logic in AdvancedEnvironmentSelector to use byProjectId, improving data consistency and clarity
This commit is contained in:
parent
fb749cd862
commit
d199a54033
@ -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();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user