From 01b1f125fca78545ec3f295c740f8b0322903d76 Mon Sep 17 00:00:00 2001 From: Artem Smirnov Date: Wed, 2 Jan 2019 16:19:50 +0200 Subject: [PATCH] Fix the 101 example Change the IPFS-101 example according to the recent API changes --- examples/ipfs-101/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/ipfs-101/README.md b/examples/ipfs-101/README.md index 1350777e70..54dd707bca 100644 --- a/examples/ipfs-101/README.md +++ b/examples/ipfs-101/README.md @@ -48,7 +48,7 @@ node.on('ready', async () => { console.log('Version:', version.version) - const filesAdded = await node.add({ + const filesAdded = await node.files.add({ path: 'hello.txt', content: Buffer.from('Hello World 101') }) @@ -76,14 +76,14 @@ node.on('ready', async () => { console.log('Version:', version.version) - const filesAdded = await node.add({ + const filesAdded = await node.files.add({ path: 'hello.txt', content: Buffer.from('Hello World 101') }) console.log('Added file:', filesAdded[0].path, filesAdded[0].hash) - const fileBuffer = await node.cat(filesAdded[0].hash) + const fileBuffer = await node.files.cat(filesAdded[0].hash) console.log('Added file contents:', fileBuffer.toString()) })