mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-19 08:19:15 +08:00
fix: 解决镜像仓库编辑失败的问题 (#3029)
This commit is contained in:
parent
136489e346
commit
4535c0b90b
@ -217,12 +217,12 @@ func (u *ImageRepoService) handleRegistries(newHost, delHost, handle string) err
|
|||||||
case "create":
|
case "create":
|
||||||
registries = common.RemoveRepeatElement(append(registries, newHost))
|
registries = common.RemoveRepeatElement(append(registries, newHost))
|
||||||
case "update":
|
case "update":
|
||||||
registries = common.RemoveRepeatElement(append(registries, newHost))
|
|
||||||
for i, regi := range registries {
|
for i, regi := range registries {
|
||||||
if regi == delHost {
|
if regi == delHost {
|
||||||
registries = append(registries[:i], registries[i+1:]...)
|
registries = append(registries[:i], registries[i+1:]...)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
registries = common.RemoveRepeatElement(append(registries, newHost))
|
||||||
case "delete":
|
case "delete":
|
||||||
for i, regi := range registries {
|
for i, regi := range registries {
|
||||||
if regi == delHost {
|
if regi == delHost {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user