buckets: delete is supported again

This commit is contained in:
jimmylee 2020-08-19 17:36:18 -07:00
parent 1513693d73
commit ba470a6fde

View File

@ -42,10 +42,10 @@ export default async (req, res) => {
const i = await PrivateKey.fromString(user.data.tokens.api);
const b = await Buckets.withKeyInfo(TEXTILE_KEY_INFO);
const tokenResponse = await b.getToken(i);
const openResponse = await b.open("data");
const openResponse = await b.getOrInit("data");
try {
const response = await b.remove(openResponse.key);
const response = await b.remove(openResponse.root.key);
console.log({ response });
} catch (e) {
console.log(e);