store host platform with lowwercase

This commit is contained in:
liugq 2023-08-03 15:44:47 +08:00
parent 31a59cb8e6
commit 3758c8a541
1 changed files with 2 additions and 0 deletions

View File

@ -14,6 +14,7 @@ import (
"infini.sh/framework/core/orm"
"infini.sh/framework/core/util"
"net/http"
"strings"
"time"
)
@ -80,6 +81,7 @@ func (h *APIHandler) enrollHost(w http.ResponseWriter, req *http.Request, ps htt
Refresh: "wait_for",
}
}
hostInfo.OSInfo.Platform = strings.ToLower(hostInfo.OSInfo.Platform)
err = orm.Create(ctx, hostInfo)
if err != nil {
errors[hi.IP] = util.MapStr{