mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-13 21:45:58 +08:00
Merge branch 'del' of github.com:OpenIMSDK/Open-IM-Server into del
# Conflicts: # pkg/common/db/mysql_model/im_mysql_model/ip_model.go
This commit is contained in:
@@ -8,7 +8,6 @@ import (
|
||||
imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model"
|
||||
http2 "Open_IM/pkg/common/http"
|
||||
"Open_IM/pkg/common/log"
|
||||
pbAuth "Open_IM/pkg/proto/auth"
|
||||
pbFriend "Open_IM/pkg/proto/friend"
|
||||
"Open_IM/pkg/utils"
|
||||
"encoding/json"
|
||||
@@ -47,10 +46,12 @@ func SetPassword(c *gin.Context) {
|
||||
Limited, LimitError := imdb.IsLimitRegisterIp(ip)
|
||||
if LimitError != nil {
|
||||
log.Error(params.OperationID, utils.GetSelfFuncName(), LimitError, ip)
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": constant.FormattingError, "errMsg": err.Error()})
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": constant.ErrDB.ErrCode, "errMsg": LimitError.Error()})
|
||||
return
|
||||
}
|
||||
if Limited {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": constant.FormattingError, "errMsg": err.Error()})
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": constant.RegisterLimit, "errMsg": "limited"})
|
||||
return
|
||||
}
|
||||
|
||||
var account string
|
||||
|
||||
Reference in New Issue
Block a user