mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-31 14:08:06 +08:00
fix: 解决网站域名重复端口不能提交的问题 (#2850)
This commit is contained in:
parent
ac97d3c05a
commit
01f5c868b7
@ -719,7 +719,6 @@ func getWebsiteDomains(domains string, defaultPort int, websiteID uint) (domainM
|
|||||||
}
|
}
|
||||||
|
|
||||||
for port := range ports {
|
for port := range ports {
|
||||||
addPorts = append(addPorts, port)
|
|
||||||
if existPorts, _ := websiteDomainRepo.GetBy(websiteDomainRepo.WithPort(port)); len(existPorts) == 0 {
|
if existPorts, _ := websiteDomainRepo.GetBy(websiteDomainRepo.WithPort(port)); len(existPorts) == 0 {
|
||||||
errMap := make(map[string]interface{})
|
errMap := make(map[string]interface{})
|
||||||
errMap["port"] = port
|
errMap["port"] = port
|
||||||
@ -742,6 +741,9 @@ func getWebsiteDomains(domains string, defaultPort int, websiteID uint) (domainM
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if existPorts, _ := websiteDomainRepo.GetBy(websiteDomainRepo.WithWebsiteId(websiteID), websiteDomainRepo.WithPort(port)); len(existPorts) == 0 {
|
||||||
|
addPorts = append(addPorts, port)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user