mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2026-04-15 01:41:56 +00:00
fix secret updating (#828)
This commit is contained in:
@@ -88,10 +88,10 @@ func PatchSecret(c *gin.Context) {
|
||||
if in.Value != "" {
|
||||
secret.Value = in.Value
|
||||
}
|
||||
if len(in.Events) != 0 {
|
||||
if in.Events != nil {
|
||||
secret.Events = in.Events
|
||||
}
|
||||
if len(in.Images) != 0 {
|
||||
if in.Images != nil {
|
||||
secret.Images = in.Images
|
||||
}
|
||||
|
||||
|
||||
@@ -133,7 +133,10 @@ export default defineComponent({
|
||||
},
|
||||
set(value) {
|
||||
if (selectedSecret.value) {
|
||||
selectedSecret.value.image = value.split(',').map((s) => s.trim());
|
||||
selectedSecret.value.image = value
|
||||
.split(',')
|
||||
.map((s) => s.trim())
|
||||
.filter((s) => s !== '');
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user