Skip to content

Commit a91e039

Browse files
authored
fix: add updateUserInfoEx Check. (#189)
1 parent 2ee7c15 commit a91e039

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

user/user.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,16 @@ func (x *SearchNotificationAccountReq) Check() error {
287287
return nil
288288
}
289289

290+
func (x *UpdateUserInfoExReq) Check() error {
291+
if x.UserInfo == nil {
292+
return errors.New("userInfo is empty")
293+
}
294+
if x.UserInfo.UserID == "" {
295+
return errors.New("userID is empty")
296+
}
297+
return nil
298+
}
299+
290300
func (x *GetDesignateUsersResp) Format() any {
291301
if len(x.UsersInfo) > 20 {
292302
return fmt.Sprintf("len is %v", len(x.UsersInfo))

0 commit comments

Comments
 (0)