Update html-routes.js

fixed issue with nsfw not becoming a boolean
This commit is contained in:
Bill Bittner 2017-05-26 02:25:44 -07:00 committed by GitHub
parent f71b986679
commit 54c72c9745

View file

@ -20,7 +20,7 @@ function createPublishObject(req){
"author": req.body.author, "author": req.body.author,
"language": req.body.language, "language": req.body.language,
"license": req.body.license, "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){ app.use("*", function(req, res){
res.sendFile(path.join(__dirname, '../public', 'fourOhfour.html')); res.sendFile(path.join(__dirname, '../public', 'fourOhfour.html'));
}); });
} }