Skip to content

Commit

Permalink
add gin check for resgister user info (#360)
Browse files Browse the repository at this point in the history
* update component check

* update component check

* update component check

* update component check

* update component check

* update component check

* update component check

* update component check

* update mysql check

* update register user info check

* update register user info check
  • Loading branch information
AndrewZuo01 authored Jan 10, 2024
1 parent c39bfb9 commit 9bc8638
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/proto/chat/chat.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ func (x *RegisterUserReq) Check() error {
//if x.VerifyCode == "" {
// return errs.ErrArgs.Wrap("VerifyCode is empty")
//}
if x.User.Nickname == "" {
return errs.ErrArgs.Wrap("Nickname is nil")
}
if x.Platform < constant2.IOSPlatformID || x.Platform > constant2.AdminPlatformID {
return errs.ErrArgs.Wrap("platform is invalid")
}
Expand Down

0 comments on commit 9bc8638

Please sign in to comment.