This commit is contained in:
ang-st
2015-06-06 02:12:32 +00:00
parent 5f8e0d57f7
commit 2a653295b4
7 changed files with 277 additions and 15 deletions

View File

@@ -11,6 +11,7 @@ var bcrypt = require('bcrypt-nodejs');
// Load a page from the database and render as html
exports.index = function (req, res, next) {
DB.loadPage(req.params.name, function (err, page) {
console.log("___" + page)
if (err) return next(err);
if (page.exists==false && !req.isAuthenticated())
res.redirect('/')