From 7404ded2e2fe7cfc02c2ac8733377900af60e09b Mon Sep 17 00:00:00 2001 From: pjy <1736989646@qq.com> Date: Fri, 25 Feb 2022 15:37:27 +0800 Subject: [PATCH] modify add member --- modules/msp/member/mebmer.service.go | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/modules/msp/member/mebmer.service.go b/modules/msp/member/mebmer.service.go index 2aa341f360c..3dbd120ce2c 100644 --- a/modules/msp/member/mebmer.service.go +++ b/modules/msp/member/mebmer.service.go @@ -204,13 +204,10 @@ func (m memberService) CreateOrUpdateMember(ctx context.Context, request *pb.Cre return nil, errors.NewInternalServerError(fmt.Errorf("Query project record by scopeid is empty scopeId is %v", request.Scope.Id)) } memberReq.Scope.ID = projectIdStr - //userId := apis.GetUserID(ctx) - userIds := request.UserIds - for _, userId := range userIds { - err = m.p.bdl.AddMember(memberReq, userId) - if err != nil { - return nil, errors.NewInternalServerError(err) - } + userId := apis.GetUserID(ctx) + err = m.p.bdl.AddMember(memberReq, userId) + if err != nil { + return nil, errors.NewInternalServerError(err) } projectId, err := m.contextEntry(projectIdStr, request.UserIds, ctx) if err != nil {