3d-interface/controllers/thankyou/index.js

28 lines
600 B
JavaScript
Raw Normal View History

var db = require('../prototype/dbrequests.js');
var vcode = require('../../lib/vcode.js');
2015-07-29 11:04:38 +02:00
module.exports.index = function(req, res) {
2015-08-31 13:05:05 +02:00
db.verifyUser(req.session.userId, function(ok) {
if (ok) {
res.locals.vcode = vcode(req.session.workerId, req.session.campaignIp);
}
2015-08-31 13:05:05 +02:00
res.locals.workerId = req.session.workerId;
req.session = null;
res.locals.session = null;
res.setHeader('Content-Type', 'text/html');
res.render('index.jade', res.locals, function(err, result) {
res.send(result);
});
2015-07-29 11:04:38 +02:00
});
2015-07-29 11:04:38 +02:00
};