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

Commit d376730

Browse files
committed
Fixed config.replace. Should fix #633
1 parent a8b4ea6 commit d376730

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/config/replace.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,15 @@
22

33
const streamifier = require('streamifier')
44
const promisify = require('promisify-es6')
5+
const SendOneFile = require('../utils/send-one-file')
56

67
module.exports = (send) => {
8+
const sendOneFile = SendOneFile(send, 'config/replace')
79
return promisify((config, callback) => {
810
if (typeof config === 'object') {
911
config = streamifier.createReadStream(Buffer.from(JSON.stringify(config)))
1012
}
1113

12-
send({
13-
path: 'config/replace',
14-
files: config,
15-
buffer: true
16-
}, callback)
14+
sendOneFile(config, {}, callback)
1715
})
1816
}

0 commit comments

Comments
 (0)