Skip to content

Commit

Permalink
fix: admin face_url length too short (#205)
Browse files Browse the repository at this point in the history
* fix: im api UserToken error non-responsive body

* fix: set rand seed

* fix: set rand seed

* update version

* fix: optimize error code

* fix: optimize error code

* fix: chat admin userID

* fix: chat admin userID

* fix: chat admin userID

* feat: add SearchFriend

* feat: add SearchFriend

* feat: add SearchFriend

* feat: add SearchFriend

* feat: add SearchFriend

* fix: admin char length

* fix: phone already register code
  • Loading branch information
withchao authored Sep 20, 2023
1 parent cc1c5ff commit f17c398
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion internal/rpc/chat/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (o *chatSvr) SendVerifyCode(ctx context.Context, req *chat.SendVerifyCodeRe
}
_, err := o.Database.TakeAttributeByPhone(ctx, req.AreaCode, req.PhoneNumber)
if err == nil {
return nil, errs.ErrArgs.Wrap("phone already register")
return nil, eerrs.ErrPhoneAlreadyRegister.Wrap("phone already register")
} else if !o.Database.IsNotFound(err) {
return nil, err
}
Expand Down
10 changes: 5 additions & 5 deletions pkg/common/db/table/admin/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ import (

// Admin 后台管理员.
type Admin struct {
Account string `gorm:"column:account;primary_key;type:char(64)"`
Password string `gorm:"column:password;type:char(64)"`
FaceURL string `gorm:"column:face_url;type:char(64)"`
Nickname string `gorm:"column:nickname;type:char(64)"`
UserID string `gorm:"column:user_id;type:char(64)"` // openIM userID
Account string `gorm:"column:account;primary_key;type:varchar(64)"`
Password string `gorm:"column:password;type:varchar(64)"`
FaceURL string `gorm:"column:face_url;type:varchar(255)"`
Nickname string `gorm:"column:nickname;type:varchar(64)"`
UserID string `gorm:"column:user_id;type:varchar(64)"` // openIM userID
Level int32 `gorm:"column:level;default:1" `
CreateTime time.Time `gorm:"column:create_time"`
}
Expand Down

0 comments on commit f17c398

Please sign in to comment.