fix: hierarchical keys should have acc id prefix

This commit is contained in:
2025-11-30 19:49:13 +00:00
parent ccdeaf0364
commit 6c61cbe1fd

View File

@@ -2,6 +2,7 @@ package virtualfs
import ( import (
"context" "context"
"fmt"
"github.com/get-drexa/drexa/internal/blob" "github.com/get-drexa/drexa/internal/blob"
"github.com/uptrace/bun" "github.com/uptrace/bun"
@@ -27,7 +28,7 @@ func (r *HierarchicalKeyResolver) Resolve(ctx context.Context, node *Node) (blob
return "", err return "", err
} }
return blob.Key(path), nil return blob.Key(fmt.Sprintf("%s/%s", node.AccountID, path)), nil
} }
func (r *HierarchicalKeyResolver) ResolveDeletionKeys(ctx context.Context, node *Node, allKeys []blob.Key) (*DeletionPlan, error) { func (r *HierarchicalKeyResolver) ResolveDeletionKeys(ctx context.Context, node *Node, allKeys []blob.Key) (*DeletionPlan, error) {