Skip to content

Commit

Permalink
update usage of ResourceInfo.Ref -> ResourceInfo.Path
Browse files Browse the repository at this point in the history
  • Loading branch information
refs committed May 26, 2021
1 parent bb57af5 commit 6805f8f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/grpc/services/appprovider/appprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
2 changes: 1 addition & 1 deletion internal/grpc/services/gateway/publicshareprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}

Expand Down
2 changes: 1 addition & 1 deletion internal/grpc/services/gateway/usershareprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}

Expand Down

0 comments on commit 6805f8f

Please sign in to comment.