From 8034ddc413288ee0d16c8e40c24f00532373c52d Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Tue, 22 Mar 2022 14:30:07 +0800 Subject: [PATCH] mongo --- internal/api/manage/management_chat.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/api/manage/management_chat.go b/internal/api/manage/management_chat.go index d97b696f8..368a2735e 100644 --- a/internal/api/manage/management_chat.go +++ b/internal/api/manage/management_chat.go @@ -130,6 +130,7 @@ func ManagementSendMsg(c *gin.Context) { if err != nil { log.NewError(params.OperationID, "parse token failed", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "parse token failed", "sendTime": 0, "MsgID": ""}) + return } if !utils.IsContain(claims.UID, config.Config.Manager.AppManagerUid) { c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "not authorized", "sendTime": 0, "MsgID": ""}) @@ -141,11 +142,13 @@ func ManagementSendMsg(c *gin.Context) { if len(params.RecvID) == 0 { log.NewError(params.OperationID, "recvID is a null string") c.JSON(http.StatusBadRequest, gin.H{"errCode": 405, "errMsg": "recvID is a null string", "sendTime": 0, "MsgID": ""}) + return } case constant.GroupChatType: if len(params.GroupID) == 0 { log.NewError(params.OperationID, "groupID is a null string") c.JSON(http.StatusBadRequest, gin.H{"errCode": 405, "errMsg": "groupID is a null string", "sendTime": 0, "MsgID": ""}) + return } }