Skip to content

Commit

Permalink
Merge branch 'master' of github.com:alberliu/gim
Browse files Browse the repository at this point in the history
  • Loading branch information
alber committed Sep 29, 2020
2 parents 0fd3327 + 9dc4fdc commit d18ec60
Show file tree
Hide file tree
Showing 7 changed files with 202 additions and 35 deletions.
15 changes: 15 additions & 0 deletions internal/user/api/user_ext.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package api

import (
"context"
"gim/internal/user/model"
"gim/internal/user/service"
"gim/pkg/grpclib"
"gim/pkg/pb"
Expand Down Expand Up @@ -41,3 +42,17 @@ func (s *UserExtServer) GetUser(ctx context.Context, in *pb.GetUserReq) (*pb.Get
},
}, nil
}

func (s *UserExtServer) UpdateUser(ctx context.Context, in *pb.UpdateUserReq) (*pb.UpdateUserResp, error) {
userId, _, err := grpclib.GetCtxData(ctx)
if err != nil {
return nil, err
}
return &pb.UpdateUserResp{}, service.UserService.Update(ctx, model.User{
Id: userId,
Nickname: in.Nickname,
Sex: in.Sex,
AvatarUrl: in.AvatarUrl,
Extra: in.Extra,
})
}
8 changes: 4 additions & 4 deletions pkg/pb/conn.int.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions pkg/pb/logic.ext.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions pkg/pb/logic.int.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

178 changes: 159 additions & 19 deletions pkg/pb/user.ext.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions pkg/pb/user.int.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d18ec60

Please sign in to comment.