Skip to content

Commit 6ba3ba2

Browse files
committed
feat(server): use insertV2
1 parent a80f4f6 commit 6ba3ba2

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

server/internal/logic/auth/register.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func (l *Register) Register(req *types.RegisterRequest) (resp *types.RegisterRes
4747
return nil, errors.New("用户名已存在")
4848
}
4949

50-
_, err = l.svcCtx.Model.ManageUser.Insert(l.ctx, nil, &manage_user.ManageUser{
50+
err = l.svcCtx.Model.ManageUser.InsertV2(l.ctx, nil, &manage_user.ManageUser{
5151
Uuid: uuid.New().String(),
5252
Username: req.Username,
5353
Password: req.Password,

server/internal/logic/manage/user/add.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func NewAdd(ctx context.Context, svcCtx *svc.ServiceContext, r *http.Request) *A
3232

3333
func (l *Add) Add(req *types.AddRequest) (resp *types.AddResponse, err error) {
3434
userUuid := uuid.New().String()
35-
if _, err = l.svcCtx.Model.ManageUser.Insert(l.ctx, nil, &manage_user.ManageUser{
35+
if err = l.svcCtx.Model.ManageUser.InsertV2(l.ctx, nil, &manage_user.ManageUser{
3636
Uuid: userUuid,
3737
Username: req.Username,
3838
Password: req.Password,

0 commit comments

Comments
 (0)