Skip to content

Commit

Permalink
add error check
Browse files Browse the repository at this point in the history
Signed-off-by: David Christofas <dchristofas@owncloud.com>
  • Loading branch information
David Christofas committed Oct 20, 2020
1 parent 40db8d2 commit a789c6d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion internal/grpc/services/gateway/usershareprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,15 @@ func (s *svc) UpdateShare(ctx context.Context, req *collaboration.UpdateShareReq
updateGrantStatus, err := s.updateGrant(ctx, getShareRes.GetShare().GetResourceId(),
getShareRes.GetShare().GetGrantee(),
getShareRes.GetShare().GetPermissions().GetPermissions())

if err != nil {
return nil, errors.Wrap(err, "gateway: error calling updateGrant")
}

if updateGrantStatus.Code != rpc.Code_CODE_OK {
return &collaboration.UpdateShareResponse{
Status: updateGrantStatus,
}, err
}, nil
}
}

Expand Down

0 comments on commit a789c6d

Please sign in to comment.