mirror of
https://github.com/ershisan99/coolify.git
synced 2026-01-26 05:02:13 +00:00
fix: Secrets build/runtime coudl be changed after save
This commit is contained in:
@@ -10,7 +10,6 @@ type Props = {
|
||||
isPRMRSecret?: boolean;
|
||||
isNewSecret?: boolean;
|
||||
applicationId: string;
|
||||
dispatch: (name: string) => void;
|
||||
};
|
||||
|
||||
export async function saveSecret({
|
||||
@@ -20,8 +19,7 @@ export async function saveSecret({
|
||||
isBuildSecret,
|
||||
isPRMRSecret,
|
||||
isNewSecret,
|
||||
applicationId,
|
||||
dispatch
|
||||
applicationId
|
||||
}: Props): Promise<void> {
|
||||
if (!name) return errorNotification('Name is required.');
|
||||
if (!value) return errorNotification('Value is required.');
|
||||
@@ -33,13 +31,11 @@ export async function saveSecret({
|
||||
isPRMRSecret,
|
||||
isNew: isNew || false
|
||||
});
|
||||
dispatch('refresh');
|
||||
if (isNewSecret) {
|
||||
name = '';
|
||||
value = '';
|
||||
isBuildSecret = false;
|
||||
}
|
||||
toast.push('Secret saved.');
|
||||
} catch ({ error }) {
|
||||
return errorNotification(error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user