This commit is contained in:
wangchuxiao
2022-09-05 17:52:43 +08:00
parent 9f4c367249
commit 05b5a0ada3
9 changed files with 438 additions and 454 deletions
+1 -8
View File
@@ -3,7 +3,6 @@ package apiAuth
import (
api "Open_IM/pkg/base_info"
"Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant"
"Open_IM/pkg/common/log"
"Open_IM/pkg/common/token_verify"
"Open_IM/pkg/grpc-etcdv3/getcdv3"
@@ -67,13 +66,7 @@ func UserRegister(c *gin.Context) {
if reply.CommonResp.ErrCode != 0 {
errMsg := req.OperationID + " " + " UserRegister failed " + reply.CommonResp.ErrMsg + req.String()
log.NewError(req.OperationID, errMsg)
if reply.CommonResp.ErrCode == constant.RegisterLimit {
c.JSON(http.StatusOK, gin.H{"errCode": constant.RegisterLimit, "errMsg": "用户注册被限制"})
} else if reply.CommonResp.ErrCode == constant.InvitationError {
c.JSON(http.StatusOK, gin.H{"errCode": constant.InvitationError, "errMsg": "邀请码错误"})
} else {
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
}
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
}