Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Fix the 101 example #1801

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions examples/ipfs-101/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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')
})
Expand Down Expand Up @@ -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())
})
Expand Down