From abd28f9633da4ac2f7fbdfd930c11a46b567b105 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sat, 24 Jun 2017 23:39:03 +0200 Subject: style: use simpler syntax for setting response type --- src/responders.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/responders.js b/src/responders.js index a11e598..b6354a5 100644 --- a/src/responders.js +++ b/src/responders.js @@ -37,7 +37,7 @@ function showPage (name) { module.exports = { home (ctx, config, postsStream) { - ctx.set('Content-Type', 'text/html') + ctx.type = 'html' ctx.body = templates .layout() .pipe(rheo()) @@ -50,7 +50,7 @@ module.exports = { }, post (ctx, config, post) { - ctx.set('Content-Type', 'text/html') + ctx.type = 'html' ctx.body = templates .layout() .pipe(rheo()) @@ -62,7 +62,7 @@ module.exports = { }, taxon (ctx, config, taxonItems) { - ctx.set('Content-Type', 'text/html') + ctx.type = 'html' ctx.body = templates .layout() .pipe(rheo()) -- cgit 1.4.1