forked from all_user/stat_center
代码调整
This commit is contained in:
@@ -6,7 +6,6 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"stat/api/proto"
|
||||
"stat/common"
|
||||
"stat/common/log"
|
||||
"stat/common/stdLog"
|
||||
"stat/common/utils"
|
||||
@@ -115,15 +114,6 @@ func AgentLogin(ctx context.Context, ip string, param proto.AgentLoginReq) (code
|
||||
|
||||
imgCodeByte := statg.VerifyIMGStore.Get(param.ImgID, true)
|
||||
if bytes.Equal(imgCodeByte, imgs) {
|
||||
channelInfo.ShowMagic += 1
|
||||
doc := bson.M{"$set": bson.M{channelmod.FN.ChannelInfo.ShowMagic: channelInfo.ShowMagic}}
|
||||
if err = channelmod.UpdateOneChannelInfo(ctx, bson.M{}, doc); err != nil {
|
||||
code = stdLog.Failure
|
||||
return code, channelInfo
|
||||
}
|
||||
code = stdLog.VerifySmsCodeFailed
|
||||
return
|
||||
} else if bytes.Equal(imgCodeByte, common.ArrayReverseByte(imgs)) {
|
||||
channelInfo.ShowMagic = 1
|
||||
} else {
|
||||
code = stdLog.VerifySmsCodeFailed
|
||||
|
||||
Reference in New Issue
Block a user