Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Commit 0246f14

Browse files
authored
Merge pull request #422 from ipfs/update-addlink-api
docs: object.patch.addLink param must have cid prop
2 parents a80a85d + c9c123d commit 0246f14

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

SPEC/OBJECT.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,13 +270,13 @@ A great source of [examples][] can be found in the tests for this API.
270270

271271
`link` is the new link to be added on the node that is identified by the `multihash`, can be passed as:
272272
- `DAGLink`
273-
- Object containing: name, multihash and size properties
273+
- Object containing: name, cid and size properties
274274

275275
```js
276276
const link = {
277277
name: 'Qmef7ScwzJUCg1zUSrCmPAz45m8uP5jU7SLgt2EffjBmbL',
278278
size: 37,
279-
multihash: 'Qmef7ScwzJUCg1zUSrCmPAz45m8uP5jU7SLgt2EffjBmbL'
279+
cid: new CID('Qmef7ScwzJUCg1zUSrCmPAz45m8uP5jU7SLgt2EffjBmbL')
280280
};
281281
```
282282

@@ -300,7 +300,7 @@ If no `callback` is passed, a [promise][] is returned.
300300
ipfs.object.patch.addLink(node, {
301301
name: 'some-link'
302302
size: 10
303-
multihash: 'QmPTkMuuL6PD8L2SwTwbcs1NPg14U8mRzerB1ZrrBrkSDD'
303+
cid: new CID('QmPTkMuuL6PD8L2SwTwbcs1NPg14U8mRzerB1ZrrBrkSDD')
304304
}, (err, cid) => {
305305
if (err) {
306306
throw err
@@ -338,7 +338,7 @@ A great source of [examples][] can be found in the tests for this API.
338338
const link = {
339339
name: 'Qmef7ScwzJUCg1zUSrCmPAz45m8uP5jU7SLgt2EffjBmbL'
340340
};
341-
```
341+
```
342342

343343
`options` is a optional argument of type object, that can contain the following properties:
344344

0 commit comments

Comments
 (0)