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

Commit 5e555ef

Browse files
author
Alan Shaw
authored
test: tests and fixes for CID version agnostic read and write (#1757)
* fix: CID parsing for cat/get/ls in HTTP API License: MIT Signed-off-by: Alan Shaw <[email protected]> * fix: disable just the rule we're breaking License: MIT Signed-off-by: Alan Shaw <[email protected]> Co-Authored-By: alanshaw <[email protected]>
1 parent d5ac655 commit 5e555ef

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
"ipfs-multipart": "~0.1.0",
115115
"ipfs-repo": "~0.26.0",
116116
"ipfs-unixfs": "~0.1.16",
117-
"ipfs-unixfs-engine": "~0.35.2",
117+
"ipfs-unixfs-engine": "~0.35.3",
118118
"ipld": "~0.20.1",
119119
"ipld-bitcoin": "~0.1.8",
120120
"ipld-dag-pb": "~0.15.0",

src/http/api/resources/files-regular.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict'
22

3-
const mh = require('multihashes')
3+
const CID = require('cids')
44
const multipart = require('ipfs-multipart')
55
const debug = require('debug')
66
const tar = require('tar-stream')
@@ -51,7 +51,7 @@ exports.parseKey = (request, reply) => {
5151
}
5252

5353
try {
54-
mh.fromB58String(key)
54+
new CID(key) // eslint-disable-line no-new
5555
} catch (err) {
5656
log.error(err)
5757
return reply({

0 commit comments

Comments
 (0)