diff --git a/src/modules/ams/http/router_host.go b/src/modules/ams/http/router_host.go index 99cf2933..333ac33e 100644 --- a/src/modules/ams/http/router_host.go +++ b/src/modules/ams/http/router_host.go @@ -271,7 +271,12 @@ func v1HostRegister(c *gin.Context) { oldFields[k] = v } - uniqValue := f.SN + uniqValue := "" + + if f.UniqKey == "sn" { + uniqValue = f.SN + } + if f.UniqKey == "ip" { uniqValue = f.IP }