Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
router.get('/create', checkLogin, function (req, res, next) {
var timezoneoffset = -4;
now = date.addHours(new Date(), timezoneoffset);
now = date.format(now, 'YYYY-MM-DD');
const postId = req.params.postId;
const author = req.session.user.name;
var title = null;
var content = null;
var tag = 'others';
var top = false;
var hide = false;
var postdate = now;
var mydate = now;
WikiModel.getAllTags()
.then(function (tags) {
let post = {
title: title,
hour: function(d){return date.addHours(d,1)},
day: function(d){return date.addDays(d,1)},