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

Commit 2d4c571

Browse files
committed
chore: fix linting
1 parent 2dea4c9 commit 2d4c571

File tree

3 files changed

+12
-15
lines changed

3 files changed

+12
-15
lines changed

src/core/components/files-regular/refs-async-iterator.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ async function * objectStream (ipfs, rootCid, maxDepth, uniqueOnly) {
105105
try {
106106
// Look at each link, parent and the new depth
107107
for (const link of await getLinks(ipfs, parent.cid)) {
108-
109108
yield {
110109
parent: parent,
111110
node: link,
@@ -120,7 +119,7 @@ async function * objectStream (ipfs, rootCid, maxDepth, uniqueOnly) {
120119
}
121120
} catch (err) {
122121
if (err.code === ERR_NOT_FOUND) {
123-
err.message = `Could not find object with CID: ${node.cid}`
122+
err.message = `Could not find object with CID: ${parent.cid}`
124123
}
125124

126125
throw err

src/core/components/files-regular/refs.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const callbackify = require('callbackify')
44
const all = require('async-iterator-all')
55

66
module.exports = function (self) {
7-
return callbackify.variadic(async function refs (ipfsPath, options) {
7+
return callbackify.variadic(async function refs (ipfsPath, options) { // eslint-disable-line require-await
88
return all(self._refsAsyncIterator(ipfsPath, options))
99
})
1010
}

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

+10-12
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@ log.error = debug('ipfs:http-api:files:error')
88
const pull = require('pull-stream')
99
const pushable = require('pull-pushable')
1010
const toStream = require('pull-stream-to-stream')
11-
const abortable = require('pull-abortable')
1211
const Joi = require('@hapi/joi')
1312
const Boom = require('@hapi/boom')
14-
const ndjson = require('pull-ndjson')
1513
const { PassThrough } = require('readable-stream')
1614
const multibase = require('multibase')
1715
const isIpfs = require('is-ipfs')
@@ -378,18 +376,18 @@ function streamResponse (request, h, fn) {
378376
const errorTrailer = 'X-Stream-Error'
379377

380378
Promise.resolve()
381-
.then(() => fn(output))
382-
.catch(err => {
383-
request.raw.res.addTrailers({
384-
[errorTrailer]: JSON.stringify({
385-
Message: err.message,
386-
Code: 0
387-
})
379+
.then(() => fn(output))
380+
.catch(err => {
381+
request.raw.res.addTrailers({
382+
[errorTrailer]: JSON.stringify({
383+
Message: err.message,
384+
Code: 0
388385
})
389386
})
390-
.finally(() => {
391-
output.end()
392-
})
387+
})
388+
.finally(() => {
389+
output.end()
390+
})
393391

394392
return h.response(output)
395393
.header('x-chunked-output', '1')

0 commit comments

Comments
 (0)