敏感词校验
This commit is contained in:
parent
8a1b0c0cc4
commit
7ba1eb13a1
@ -3,6 +3,7 @@ package user
|
|||||||
import (
|
import (
|
||||||
"go_dreamfactory/comm"
|
"go_dreamfactory/comm"
|
||||||
"go_dreamfactory/pb"
|
"go_dreamfactory/pb"
|
||||||
|
"go_dreamfactory/sys/wordfilter"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 修改签名
|
// 修改签名
|
||||||
@ -13,6 +14,14 @@ func (this *apiComp) ModifysignCheck(session comm.IUserSession, req *pb.UserModi
|
|||||||
Code: pb.ErrorCode_ReqParameterError,
|
Code: pb.ErrorCode_ReqParameterError,
|
||||||
Title: pb.ErrorCode_ReqParameterError.ToString(),
|
Title: pb.ErrorCode_ReqParameterError.ToString(),
|
||||||
}
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if ok, _ := wordfilter.FindIn(req.Sign); !ok {
|
||||||
|
errdata = &pb.ErrorData{
|
||||||
|
Code: pb.ErrorCode_UserNickSensitive,
|
||||||
|
Title: pb.ErrorCode_UserNickSensitive.ToString(),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user