From f87765c0a5e01e354322ba35bcd9ae612c4f565d Mon Sep 17 00:00:00 2001 From: Thomas FORGIONE Date: Thu, 1 Oct 2015 16:48:12 +0200 Subject: [PATCH] Correction of verification of an already existing worker_id --- posts/identification/index.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/posts/identification/index.js b/posts/identification/index.js index 436e7ca..3e7aff6 100644 --- a/posts/identification/index.js +++ b/posts/identification/index.js @@ -5,11 +5,15 @@ var Log = require('../../lib/NodeLog.js'); module.exports.index = function(req, res) { - db.checkUserName(req.body.inputId, function(ok) { + var workerId = req.session.workerId || req.body.inputId; + + console.log(workerId); + + db.checkUserName(workerId, function(ok) { if (!ok) { db.createUser( - req.session.workerId || req.body.inputId, + workerId, req.body.inputAge, req.body.inputGender === 'male', req.body.input3dskills,