mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-02-18 04:15:15 +00:00
fix secret updating (#828)
This commit is contained in:
parent
313e72e56a
commit
90dcc77870
2 changed files with 6 additions and 3 deletions
|
@ -88,10 +88,10 @@ func PatchSecret(c *gin.Context) {
|
||||||
if in.Value != "" {
|
if in.Value != "" {
|
||||||
secret.Value = in.Value
|
secret.Value = in.Value
|
||||||
}
|
}
|
||||||
if len(in.Events) != 0 {
|
if in.Events != nil {
|
||||||
secret.Events = in.Events
|
secret.Events = in.Events
|
||||||
}
|
}
|
||||||
if len(in.Images) != 0 {
|
if in.Images != nil {
|
||||||
secret.Images = in.Images
|
secret.Images = in.Images
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -133,7 +133,10 @@ export default defineComponent({
|
||||||
},
|
},
|
||||||
set(value) {
|
set(value) {
|
||||||
if (selectedSecret.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 !== '');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue