feat: 合并Gin_Vue
This commit is contained in:
@@ -16,9 +16,8 @@ import (
|
||||
"ems.agt/lib/services"
|
||||
"ems.agt/restagent/config"
|
||||
|
||||
tokenConst "ems.agt/src/framework/constants/token"
|
||||
"github.com/gorilla/mux"
|
||||
|
||||
_ "github.com/go-sql-driver/mysql"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -153,7 +152,7 @@ func PostMMLToNF(w http.ResponseWriter, r *http.Request) {
|
||||
for _, mml := range mmlRequest.MML {
|
||||
mmlCommand := fmt.Sprintf("%s\n", mml)
|
||||
log.Debug("mml command:", mmlCommand)
|
||||
n, err = conn.Write([]byte(mmlCommand))
|
||||
_, err = conn.Write([]byte(mmlCommand))
|
||||
if err != nil {
|
||||
log.Errorf("Error: %s", err.Error())
|
||||
return
|
||||
@@ -211,14 +210,15 @@ func PostMMLToOMC(w http.ResponseWriter, r *http.Request) {
|
||||
hostUri := fmt.Sprintf("http://%s:%s", neInfo.Ip, neInfo.Port)
|
||||
|
||||
omcMmlVar := &mmlp.MmlVar{
|
||||
Version: "16.1.1",
|
||||
Output: mmlp.DefaultFormatType,
|
||||
MmlHome: config.GetYamlConfig().MML.MmlHome,
|
||||
Limit: 50,
|
||||
User: "",
|
||||
SessionToken: token,
|
||||
HttpUri: hostUri,
|
||||
UserAgent: config.GetDefaultUserAgent(),
|
||||
Version: "16.1.1",
|
||||
Output: mmlp.DefaultFormatType,
|
||||
MmlHome: config.GetYamlConfig().MML.MmlHome,
|
||||
Limit: 50,
|
||||
User: "",
|
||||
SessionToken: token, // 旧token
|
||||
Authorization: r.Header.Get(tokenConst.HEADER_KEY), // 请求Token
|
||||
HttpUri: hostUri,
|
||||
UserAgent: config.GetDefaultUserAgent(),
|
||||
}
|
||||
mmlRequest := new(MMLRequest)
|
||||
_ = json.Unmarshal(body, mmlRequest)
|
||||
|
||||
Reference in New Issue
Block a user