This commit is contained in:
TsMask
2024-01-05 13:54:47 +08:00

View File

@@ -128,6 +128,7 @@ func PostNeInfo(w http.ResponseWriter, r *http.Request) {
services.ResponseNotFound404UriNotExist(w, r)
return
}
neTypeUpper := strings.ToUpper(neType)
syncFlag := services.GetUriParamString(r, "sync2ne", ",", false, false)
body, err := io.ReadAll(io.LimitReader(r.Body, global.RequestBodyMaxLen))
if err != nil {
@@ -148,7 +149,7 @@ func PostNeInfo(w http.ResponseWriter, r *http.Request) {
log.Debug("NE info:", neInfo)
//if !config.GetYamlConfig().OMC.Chk2Ne {
if syncFlag == "false" {
if syncFlag == "false" || neTypeUpper == config.GetYamlConfig().OMC.NeType {
neInfo.Status = NEStatusMaintain
affected, err := dborm.XormInsertNeInfo(neInfo)
if err != nil {