fix: upf mml
This commit is contained in:
@@ -138,15 +138,15 @@ func PostMMLToNF(w http.ResponseWriter, r *http.Request) {
|
|||||||
mmlRequest := new(MMLRequest)
|
mmlRequest := new(MMLRequest)
|
||||||
_ = json.Unmarshal(body, mmlRequest)
|
_ = json.Unmarshal(body, mmlRequest)
|
||||||
|
|
||||||
n, err = conn.Read(buf[0:])
|
// n, err = conn.Read(buf[0:])
|
||||||
if err != nil {
|
// if err != nil {
|
||||||
log.Error("Failed to read:", err)
|
// log.Error("Failed to read:", err)
|
||||||
mmlResult = append(mmlResult, err.Error())
|
// mmlResult = append(mmlResult, err.Error())
|
||||||
response := Response{mmlResult}
|
// response := Response{mmlResult}
|
||||||
services.ResponseWithJson(w, http.StatusOK, response)
|
// services.ResponseWithJson(w, http.StatusOK, response)
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
log.Debug(string(buf[0:n]))
|
// log.Debug(string(buf[0:n]))
|
||||||
|
|
||||||
loginStr := fmt.Sprintf("%s\n%s\n", config.GetYamlConfig().MML.User, config.GetYamlConfig().MML.Password)
|
loginStr := fmt.Sprintf("%s\n%s\n", config.GetYamlConfig().MML.User, config.GetYamlConfig().MML.Password)
|
||||||
_, err = conn.Write([]byte(loginStr))
|
_, err = conn.Write([]byte(loginStr))
|
||||||
|
|||||||
Reference in New Issue
Block a user