@@ -39,7 +39,25 @@ func (self *UserServiceImpl) UpdateUserInfo(payload *UserInfoPayload) (result *U
|
||||
}
|
||||
|
||||
if payload.Data.Nickname != nil {
|
||||
if utf8.RuneCountInString(*payload.Data.Nickname) > 24 {
|
||||
val := *payload.Data.Nickname
|
||||
if val == "" {
|
||||
execption := new(exception.Builder).
|
||||
SetStatus(exception.StatusUser).
|
||||
SetService(exception.ServiceUser).
|
||||
SetType(exception.TypeCommon).
|
||||
SetOriginal(exception.CommonErrorInvalidInput)
|
||||
|
||||
result = &UserInfoResult{
|
||||
Common: shared.CommonResult{
|
||||
HttpCode: 400,
|
||||
Exception: execption,
|
||||
},
|
||||
Data: nil,
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
if utf8.RuneCountInString(val) > 24 {
|
||||
execption := new(exception.Builder).
|
||||
SetStatus(exception.StatusUser).
|
||||
SetService(exception.ServiceUser).
|
||||
|
||||
Reference in New Issue
Block a user