From 54c72c97452f38c454614dc596b8acefe0970010 Mon Sep 17 00:00:00 2001 From: Bill Bittner Date: Fri, 26 May 2017 02:25:44 -0700 Subject: [PATCH] Update html-routes.js fixed issue with nsfw not becoming a boolean --- routes/html-routes.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/routes/html-routes.js b/routes/html-routes.js index 3f32294f..59df73cd 100644 --- a/routes/html-routes.js +++ b/routes/html-routes.js @@ -20,7 +20,7 @@ function createPublishObject(req){ "author": req.body.author, "language": req.body.language, "license": req.body.license, - "nsfw": req.body.nsfw + "nsfw": (req.body.nsfw.toLowerCase() === "true") } } }; @@ -75,4 +75,4 @@ module.exports = function(app){ app.use("*", function(req, res){ res.sendFile(path.join(__dirname, '../public', 'fourOhfour.html')); }); -} \ No newline at end of file +}