neinfo recover

This commit is contained in:
2023-09-11 14:45:32 +08:00
parent d703d15220
commit 22bfd015ce
3 changed files with 19 additions and 15 deletions

View File

@@ -105,7 +105,12 @@ func PostNeInfo(w http.ResponseWriter, r *http.Request) {
log.Debug("Body:", string(body))
neInfo := new(dborm.NeInfo)
_ = json.Unmarshal(body, neInfo)
err = json.Unmarshal(body, neInfo)
if err != nil {
log.Error("Failed to json.Unmarshal:", err)
services.ResponseInternalServerError500ProcessError(w, err)
return
}
neInfo.UpdateTime = time.Now().Format(time.DateTime)
log.Debug("NE info:", neInfo)