mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-24 10:22:36 +08:00
validate
This commit is contained in:
parent
f4ba537328
commit
dc637059ab
11
pkg/proto/friend/validate.go
Normal file
11
pkg/proto/friend/validate.go
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
package friend
|
||||||
|
|
||||||
|
import "github.com/OpenIMSDK/Open-IM-Server/pkg/errs"
|
||||||
|
|
||||||
|
func (m *ApplyToAddFriendReq) Check() error {
|
||||||
|
*m = ApplyToAddFriendReq{}
|
||||||
|
if m.GetToUserID() == "" {
|
||||||
|
return errs.ErrArgs.Wrap("get toUserID is empty")
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user