store host platform with lowwercase
This commit is contained in:
parent
31a59cb8e6
commit
3758c8a541
|
@ -14,6 +14,7 @@ import (
|
||||||
"infini.sh/framework/core/orm"
|
"infini.sh/framework/core/orm"
|
||||||
"infini.sh/framework/core/util"
|
"infini.sh/framework/core/util"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -80,6 +81,7 @@ func (h *APIHandler) enrollHost(w http.ResponseWriter, req *http.Request, ps htt
|
||||||
Refresh: "wait_for",
|
Refresh: "wait_for",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
hostInfo.OSInfo.Platform = strings.ToLower(hostInfo.OSInfo.Platform)
|
||||||
err = orm.Create(ctx, hostInfo)
|
err = orm.Create(ctx, hostInfo)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
errors[hi.IP] = util.MapStr{
|
errors[hi.IP] = util.MapStr{
|
||||||
|
|
Loading…
Reference in New Issue