aboutsummaryrefslogtreecommitdiff
path: root/lib/serve.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/serve.js')
-rw-r--r--lib/serve.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/serve.js b/lib/serve.js
index 749e075..d292158 100644
--- a/lib/serve.js
+++ b/lib/serve.js
@@ -2090,7 +2090,7 @@ Serve.prototype.blob = function (id, path) {
}
if (unbox) {
try {
- key = new Buffer(unbox, 'base64')
+ key = Buffer.from(unbox, 'base64')
} catch(err) {
return self.respond(400, err.message)
}
@@ -2147,14 +2147,14 @@ Serve.prototype.blob = function (id, path) {
self.res.writeHead(206)
wroteHeaders = true
}),
- pull.map(Buffer),
+ pull.map(Buffer.from),
self.respondSink()
)
} else {
pull(
self.app.getBlob(id, key),
- pull.map(Buffer),
+ pull.map(Buffer.from),
ident(gotType),
self.respondSink()
)
@@ -2197,7 +2197,7 @@ Serve.prototype.image = function (path) {
}
if (unbox) {
try {
- key = new Buffer(unbox, 'base64')
+ key = Buffer.from(unbox, 'base64')
} catch(err) {
return self.respond(400, err.message)
}
@@ -2217,7 +2217,7 @@ Serve.prototype.image = function (path) {
pull(
self.app.getBlob(id, key),
- pull.map(Buffer),
+ pull.map(Buffer.from),
ident(heresTheType),
pull.collect(onFullBuffer)
)