first commit
This commit is contained in:
24
gateway/api/v1/internal/logic/group/change_owner.go
Normal file
24
gateway/api/v1/internal/logic/group/change_owner.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package logic
|
||||
|
||||
import (
|
||||
"gitlab.33.cn/chat/dtalk/gateway/api/v1/internal/types"
|
||||
pb "gitlab.33.cn/chat/dtalk/service/group/api"
|
||||
"gitlab.33.cn/utils/go-kit/convert"
|
||||
)
|
||||
|
||||
func (l *GroupLogic) ChangeOwner(req *types.ChangeOwnerReq) (*types.ChangeOwnerResp, error) {
|
||||
groupId := convert.ToInt64(req.Id)
|
||||
personId := l.getOpe()
|
||||
memberId := req.MemberId
|
||||
|
||||
_, err := l.svcCtx.GroupClient.ChangeOwner(l.ctx, &pb.ChangeOwnerReq{
|
||||
GroupId: groupId,
|
||||
PersonId: personId,
|
||||
MemberId: memberId,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &types.ChangeOwnerResp{}, nil
|
||||
}
|
||||
Reference in New Issue
Block a user