unistore: refactor get to return a reader (#107951)

This commit is contained in:
Georges Chaudy
2025-07-11 11:10:19 +02:00
committed by GitHub
parent a314b99589
commit ea0ddb3fc9
7 changed files with 48 additions and 65 deletions
+1 -5
View File
@@ -239,11 +239,7 @@ func (d *dataStore) Get(ctx context.Context, key DataKey) (io.ReadCloser, error)
return nil, fmt.Errorf("invalid data key: %w", err)
}
obj, err := d.kv.Get(ctx, dataSection, key.String())
if err != nil {
return nil, err
}
return obj.Value, nil
return d.kv.Get(ctx, dataSection, key.String())
}
func (d *dataStore) Save(ctx context.Context, key DataKey, value io.Reader) error {