File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed
apps/webapp/app/v3/environmentVariables Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -91,17 +91,13 @@ export class EnvironmentVariablesRepository implements Repository {
91
91
return { success : false as const , error : `Environment not found` } ;
92
92
}
93
93
94
- // Check to see if any of the variables are `TRIGGER_SECRET_KEY` or `TRIGGER_API_URL`
95
- const triggerKeys = options . variables . map ( ( v ) => v . key ) ;
96
- if ( triggerKeys . includes ( "TRIGGER_SECRET_KEY" ) || triggerKeys . includes ( "TRIGGER_API_URL" ) ) {
97
- return {
98
- success : false as const ,
99
- error : `You cannot set the variables TRIGGER_SECRET_KEY or TRIGGER_API_URL as they will be set automatically` ,
100
- } ;
101
- }
94
+ // Remove `TRIGGER_SECRET_KEY` or `TRIGGER_API_URL`
95
+ let values = options . variables . filter (
96
+ ( v ) => v . key !== "TRIGGER_SECRET_KEY" && v . key !== "TRIGGER_API_URL"
97
+ ) ;
102
98
103
99
//get rid of empty variables
104
- const values = options . variables . filter ( ( v ) => v . key . trim ( ) !== "" && v . value . trim ( ) !== "" ) ;
100
+ values = options . variables . filter ( ( v ) => v . key . trim ( ) !== "" && v . value . trim ( ) !== "" ) ;
105
101
if ( values . length === 0 ) {
106
102
return { success : false as const , error : `You must set at least one value` } ;
107
103
}
You can’t perform that action at this time.
0 commit comments