From 6805f8f538d2a83f645647edb74db82900df23b5 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Wed, 26 May 2021 16:18:08 +0200 Subject: [PATCH] update usage of ResourceInfo.Ref -> ResourceInfo.Path --- internal/grpc/services/appprovider/appprovider.go | 2 +- internal/grpc/services/gateway/publicshareprovider.go | 2 +- internal/grpc/services/gateway/usershareprovider.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/grpc/services/appprovider/appprovider.go b/internal/grpc/services/appprovider/appprovider.go index f5f7e2e26c0..f53f7356a77 100644 --- a/internal/grpc/services/appprovider/appprovider.go +++ b/internal/grpc/services/appprovider/appprovider.go @@ -218,7 +218,7 @@ func (s *service) OpenFileInAppProvider(ctx context.Context, req *providerpb.Ope } return res, nil } - viewOptions := appsURLMap[path.Ext(req.ResourceInfo.Ref.Path)] + viewOptions := appsURLMap[path.Ext(req.ResourceInfo.Path.Path)] viewOptionsMap, ok := viewOptions.(map[string]interface{}) if !ok { res := &providerpb.OpenFileInAppProviderResponse{ diff --git a/internal/grpc/services/gateway/publicshareprovider.go b/internal/grpc/services/gateway/publicshareprovider.go index c4faa7942b4..d24cac5021d 100644 --- a/internal/grpc/services/gateway/publicshareprovider.go +++ b/internal/grpc/services/gateway/publicshareprovider.go @@ -30,7 +30,7 @@ import ( ) func (s *svc) CreatePublicShare(ctx context.Context, req *link.CreatePublicShareRequest) (*link.CreatePublicShareResponse, error) { - if s.isSharedFolder(ctx, req.ResourceInfo.Ref.Path) { // FIXME @butonic REFERENCE ... pass ref to isSharedFolder? + if s.isSharedFolder(ctx, req.ResourceInfo.Path.Path) { // FIXME @butonic REFERENCE ... pass ref to isSharedFolder? return nil, errtypes.AlreadyExists("gateway: can't create a public share of the share folder itself") } diff --git a/internal/grpc/services/gateway/usershareprovider.go b/internal/grpc/services/gateway/usershareprovider.go index 449f403b01e..7d065dbf450 100644 --- a/internal/grpc/services/gateway/usershareprovider.go +++ b/internal/grpc/services/gateway/usershareprovider.go @@ -36,7 +36,7 @@ import ( // TODO(labkode): add multi-phase commit logic when commit share or commit ref is enabled. func (s *svc) CreateShare(ctx context.Context, req *collaboration.CreateShareRequest) (*collaboration.CreateShareResponse, error) { - if s.isSharedFolder(ctx, req.ResourceInfo.Ref.Path) { // FIXME @butonic REFERENCE ... pass ref to isSharedFolder? + if s.isSharedFolder(ctx, req.ResourceInfo.Path.Path) { // FIXME @butonic REFERENCE ... pass ref to isSharedFolder? return nil, errtypes.AlreadyExists("gateway: can't share the share folder itself") }