Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

fix: stats/bw uses stream #640

Merged
merged 7 commits into from
Dec 6, 2017
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/stats/bw.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict'

const promisify = require('promisify-es6')
const streamToValue = require('../utils/stream-to-value')

module.exports = (send) => {
return promisify((opts, callback) => {
Expand All @@ -9,9 +10,9 @@ module.exports = (send) => {
opts = {}
}

send({
send.andTransform({
path: 'stats/bw',
qs: opts
}, callback)
}, streamToValue, callback)
})
}