From 9d9d3db701bdb607a3118ce3e3cb9f115b8e7117 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 28 Sep 2022 15:33:49 +0800 Subject: [PATCH] http status change --- internal/api/msg/del_msg.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/api/msg/del_msg.go b/internal/api/msg/del_msg.go index 07322f8d9..7ded12d59 100644 --- a/internal/api/msg/del_msg.go +++ b/internal/api/msg/del_msg.go @@ -80,7 +80,7 @@ func DelSuperGroupMsg(c *gin.Context) { ) rpcReq := &rpc.DelSuperGroupMsgReq{} if err := c.BindJSON(&req); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) + c.JSON(http.StatusOK, gin.H{"errCode": 400, "errMsg": err.Error()}) return } utils.CopyStructFields(rpcReq, &req) @@ -91,7 +91,7 @@ func DelSuperGroupMsg(c *gin.Context) { if !ok { errMsg := req.OperationID + " " + rpcReq.OpUserID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token") log.NewError(req.OperationID, errMsg) - c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg}) + c.JSON(http.StatusOK, gin.H{"errCode": 500, "errMsg": errMsg}) return } options := make(map[string]bool, 5)