File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
packages/ipfs-core/src/components/object/patch Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -398,9 +398,9 @@ An optional object which may have the following keys:
398398``` JavaScript
399399// cid is CID of the DAG node created by removing a link
400400const cid = await ipfs .object .patch .rmLink (node, {
401- name : ' some-link' ,
402- size : 10 ,
403- cid : CID .parse (' QmPTkMuuL6PD8L2SwTwbcs1NPg14U8mRzerB1ZrrBrkSDD' )
401+ Name : ' some-link' ,
402+ Tsize : 10 ,
403+ Hash : CID .parse (' QmPTkMuuL6PD8L2SwTwbcs1NPg14U8mRzerB1ZrrBrkSDD' )
404404})
405405```
406406
Original file line number Diff line number Diff line change @@ -14,9 +14,9 @@ export function createRmLink ({ repo, preload }) {
1414 /**
1515 * @type {import('ipfs-core-types/src/object/patch').API<{}>["rmLink"] }
1616 */
17- async function rmLink ( multihash , linkRef , options = { } ) {
18- const node = await get ( multihash , options )
19- const name = ( typeof linkRef === 'string' ? linkRef : linkRef . Name ) || ''
17+ async function rmLink ( cid , link , options = { } ) {
18+ const node = await get ( cid , options )
19+ const name = ( typeof link === 'string' ? link : link . Name ) || ''
2020
2121 node . Links = node . Links . filter ( l => l . Name !== name )
2222
You can’t perform that action at this time.
0 commit comments