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

Commit ec3b44f

Browse files
author
Alan Shaw
committed
fix: valid multihash names in querystring
License: MIT Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
1 parent dadc065 commit ec3b44f

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

Diff for: src/http/api/resources/dag.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ exports.put = {
125125
format: Joi.string().default('cbor'),
126126
'input-enc': Joi.string().default('json'),
127127
pin: Joi.boolean(),
128-
hash: Joi.string().valid(mh.names).default('sha2-256'),
128+
hash: Joi.string().valid(Object.keys(mh.names)).default('sha2-256'),
129129
'cid-base': Joi.string().valid(multibase.names).default('base58btc')
130130
}).unknown()
131131
},

Diff for: test/http-api/interface.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,15 @@ describe('interface-ipfs-core over ipfs-http-client tests', () => {
1717

1818
tests.config(defaultCommonFactory)
1919

20-
tests.dag(defaultCommonFactory)
20+
tests.dag(defaultCommonFactory, {
21+
skip: [{
22+
name: 'should get only a CID, due to resolving locally only',
23+
reason: 'Local resolve option is not implemented yet'
24+
}, {
25+
name: 'tree',
26+
reason: 'dag.tree is not implemented yet'
27+
}]
28+
})
2129

2230
tests.dht(CommonFactory.create({
2331
spawnOptions: {

0 commit comments

Comments
 (0)