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

Commit

Permalink
test: tests and fixes for CID version agnostic read and write (#1757)
Browse files Browse the repository at this point in the history
* fix: CID parsing for cat/get/ls in HTTP API

License: MIT
Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>

* fix: disable just the rule we're breaking

License: MIT
Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>

Co-Authored-By: alanshaw <alan.shaw@protocol.ai>
  • Loading branch information
alanshaw committed Dec 15, 2018
1 parent d5ac655 commit 5e555ef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
"ipfs-multipart": "~0.1.0",
"ipfs-repo": "~0.26.0",
"ipfs-unixfs": "~0.1.16",
"ipfs-unixfs-engine": "~0.35.2",
"ipfs-unixfs-engine": "~0.35.3",
"ipld": "~0.20.1",
"ipld-bitcoin": "~0.1.8",
"ipld-dag-pb": "~0.15.0",
Expand Down
4 changes: 2 additions & 2 deletions src/http/api/resources/files-regular.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict'

const mh = require('multihashes')
const CID = require('cids')
const multipart = require('ipfs-multipart')
const debug = require('debug')
const tar = require('tar-stream')
Expand Down Expand Up @@ -51,7 +51,7 @@ exports.parseKey = (request, reply) => {
}

try {
mh.fromB58String(key)
new CID(key) // eslint-disable-line no-new
} catch (err) {
log.error(err)
return reply({
Expand Down

0 comments on commit 5e555ef

Please sign in to comment.