mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-09-04 06:19:48 +08:00
Merge branch 'del' of github.com:OpenIMSDK/Open-IM-Server into del
This commit is contained in:
commit
4ec255917d
@ -133,8 +133,12 @@ func QueryUserIPLimitLogin(c *gin.Context) {
|
|||||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": constant.ErrDB.ErrCode, "errMsg": "GetIpLimitsByUserID error!"})
|
c.JSON(http.StatusInternalServerError, gin.H{"errCode": constant.ErrDB.ErrCode, "errMsg": "GetIpLimitsByUserID error!"})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp:", resp)
|
if len(resp) > 0 {
|
||||||
c.JSON(http.StatusOK, gin.H{"errCode": 0, "errMsg": "", "data": resp})
|
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp:", resp)
|
||||||
|
c.JSON(http.StatusOK, gin.H{"errCode": 0, "errMsg": "", "data": resp})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
c.JSON(http.StatusOK, gin.H{"errCode": 0, "errMsg": "", "data": "[]"})
|
||||||
}
|
}
|
||||||
|
|
||||||
type AddUserIPLimitLoginReq struct {
|
type AddUserIPLimitLoginReq struct {
|
||||||
|
@ -59,7 +59,7 @@ func DeleteOneFromIpLimits(ip string) error {
|
|||||||
|
|
||||||
func GetIpLimitsLoginByUserID(userID string) ([]db.UserIpLimit, error) {
|
func GetIpLimitsLoginByUserID(userID string) ([]db.UserIpLimit, error) {
|
||||||
var ips []db.UserIpLimit
|
var ips []db.UserIpLimit
|
||||||
err := db.DB.MysqlDB.DefaultGormDB().Model(&db.UserIpLimit{}).Where("user_id=?", userID).Take(&ips).Error
|
err := db.DB.MysqlDB.DefaultGormDB().Model(&db.UserIpLimit{}).Where("user_id=?", userID).Find(&ips).Error
|
||||||
return ips, err
|
return ips, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user