Commit d5e88ed
committed
fix(core/components/dag): make options in
The [dag.put](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DAG.md#dagput) interface
takes an options object which is required, but should be optional with
decent defaults.
See dedicated test here: ipfs-inactive/interface-js-ipfs-core#316
This commit implements this behaviour.
**Before**:
```js
ipfs.dag.put(obj, options, (err, cid) => {...});
```
^ Prior to this commit, without passing `options`, this call resulted in an error.
**After**:
```js
ipfs.dag.put(obj, (err, cid) => {...});
```
^ This is now perfectly fine.
Fixes ipfs#1395
License: MIT
Signed-off-by: Pascal Precht <[email protected]>put API optional1 parent 402b865 commit d5e88ed
1 file changed
+11
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
12 | 23 | | |
13 | 24 | | |
14 | 25 | | |
| |||
0 commit comments