This repository was archived by the owner on Mar 10, 2020. It is now read-only.
File tree 2 files changed +11
-4
lines changed
2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -236,9 +236,9 @@ const ipfs = ipfsClient({
236
236
- [ ` ipfs.refs(ipfsPath, [options], [callback]) ` ] ( https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REFS.md#refs )
237
237
- [ ` ipfs.refsReadableStream(ipfsPath, [options], [callback]) ` ] ( https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REFS.md#refsreadablestream )
238
238
- [ ` ipfs.refsPullStream(ipfsPath, [options], [callback]) ` ] ( https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REFS.md#refspullstream )
239
- - [ ` ipfs.refs.local([callback]) ` ] ( https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REFS.md#refslocal )
240
- - [ ` ipfs.refs.localReadableStream([callback]) ` ] ( https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REFS.md#refslocalreadablestream )
241
- - [ ` ipfs.refs.localPullStream([callback]) ` ] ( https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REFS.md#refslocalpullstream )
239
+ - [ ` ipfs.refs.local([options], [ callback]) ` ] ( https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REFS.md#refslocal )
240
+ - [ ` ipfs.refs.localReadableStream([options], [ callback]) ` ] ( https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REFS.md#refslocalreadablestream )
241
+ - [ ` ipfs.refs.localPullStream([options], [ callback]) ` ] ( https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REFS.md#refslocalpullstream )
242
242
243
243
#### Graph
244
244
Original file line number Diff line number Diff line change @@ -9,10 +9,17 @@ module.exports = configure(({ ky }) => {
9
9
return async function * refsLocal ( options ) {
10
10
options = options || { }
11
11
12
+ const searchParams = new URLSearchParams ( )
13
+
14
+ if ( options . multihash !== undefined ) {
15
+ searchParams . set ( 'multihash' , options . multihash )
16
+ }
17
+
12
18
const res = await ky . get ( 'refs/local' , {
13
19
timeout : options . timeout ,
14
20
signal : options . signal ,
15
- headers : options . headers
21
+ headers : options . headers ,
22
+ searchParams
16
23
} )
17
24
18
25
for await ( const file of ndjson ( toIterable ( res . body ) ) ) {
You can’t perform that action at this time.
0 commit comments