tidy code

This commit is contained in:
wenxu12345
2021-12-27 18:22:32 +08:00
parent 3446442eca
commit 30024c9814
8 changed files with 167 additions and 213 deletions
+2 -1
View File
@@ -48,6 +48,7 @@ func AddBlacklist(c *gin.Context) {
func ImportFriend(c *gin.Context) {
params := api.ImportFriendReq{}
if err := c.BindJSON(&params); err != nil {
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
log.NewError("0", "BindJSON failed ", err.Error())
return
@@ -104,7 +105,7 @@ func AddFriend(c *gin.Context) {
return
}
resp := api.AddFriendResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}}
resp := api.AddFriendResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}}
c.JSON(http.StatusOK, resp)
log.NewInfo(req.CommID.OperationID, "AddFriend api return ", resp)
}