From ee34c8c2f8b106d841ccf016a8b272db4c0b86d0 Mon Sep 17 00:00:00 2001 From: Yahya Date: Sat, 2 Sep 2017 23:59:24 +0200 Subject: [PATCH] clean up , working tests on node v8.4.0 License: MIT Signed-off-by: Yahya --- package.json | 1 - src/http/gateway/resources/gateway.js | 8 -------- src/http/gateway/resources/index.js | 4 +++- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 34004a2e80..0eb0591952 100644 --- a/package.json +++ b/package.json @@ -137,7 +137,6 @@ "multihashes": "~0.4.5", "once": "^1.4.0", "path-exists": "^3.0.0", - "promised-for": "^1.0.0", "peer-book": "^0.5.0", "peer-id": "^0.9.0", "peer-info": "^0.10.0", diff --git a/src/http/gateway/resources/gateway.js b/src/http/gateway/resources/gateway.js index a3733b9e94..37ccba22b4 100644 --- a/src/http/gateway/resources/gateway.js +++ b/src/http/gateway/resources/gateway.js @@ -1,24 +1,16 @@ 'use strict' -// const mh = require('multihashes') -// const multipart = require('ipfs-multipart') const debug = require('debug') -// const tar = require('tar-stream') const log = debug('jsipfs:http-gateway') log.error = debug('jsipfs:http-gateway:error') const pull = require('pull-stream') const toPull = require('stream-to-pull-stream') -// const pushable = require('pull-pushable') -// const EOL = require('os').EOL -// const toStream = require('pull-stream-to-stream') const fileType = require('file-type') const mime = require('mime-types') const GatewayResolver = require('../resolver') const PathUtils = require('../utils/path') const Stream = require('stream') -exports = module.exports - module.exports = { checkHash: (request, reply) => { if (!request.params.hash) { diff --git a/src/http/gateway/resources/index.js b/src/http/gateway/resources/index.js index 03f9d0901d..5a464ce193 100644 --- a/src/http/gateway/resources/index.js +++ b/src/http/gateway/resources/index.js @@ -1,3 +1,5 @@ 'use strict' -exports.gateway = require('./gateway') +module.exports = { + gateway: require('./gateway') +}