mirror of
https://github.com/filecoin-project/slate.git
synced 2024-12-25 10:05:02 +03:00
Merge pull request #163 from filecoin-project/andrew/switch-to-new-init
fix(api): use newer getOrInit method
This commit is contained in:
commit
1513693d73
@ -70,9 +70,9 @@ export const getBucketAPIFromUserToken = async (token) => {
|
||||
const identity = await PrivateKey.fromString(token);
|
||||
const buckets = await Buckets.withKeyInfo(TEXTILE_KEY_INFO);
|
||||
await buckets.getToken(identity);
|
||||
const root = await buckets.open(BUCKET_NAME);
|
||||
const target = await buckets.getOrInit(BUCKET_NAME);
|
||||
|
||||
return { buckets, bucketKey: root.key, bucketName: BUCKET_NAME };
|
||||
return { buckets, bucketKey: target.root.key, bucketName: BUCKET_NAME };
|
||||
};
|
||||
|
||||
// NOTE(jim): Requires Powergate, does not require token.
|
||||
|
Loading…
Reference in New Issue
Block a user