management system add api

This commit is contained in:
Gordon
2021-09-26 14:26:45 +08:00
parent 98ed0234fc
commit b27fc2ba35
18 changed files with 275 additions and 174 deletions
+3 -2
View File
@@ -103,9 +103,10 @@ func ManagementSendMsg(c *gin.Context) {
}
token := c.Request.Header.Get("token")
if !utils.VerifyToken(token, config.Config.AppManagerUid) {
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "token validate err,not authorized", "sendTime": 0, "MsgID": ""})
if !utils.IsContain(params.SendID, config.Config.Manager.AppManagerUid) {
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "not appManager", "sendTime": 0, "MsgID": ""})
return
}
log.InfoByKv("Ws call success to ManagementSendMsgReq", params.OperationID, "Parameters", params)