mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-26 03:41:01 +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 != "" {
|
||||
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 !== '');
|
||||
}
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue