Correction of verification of an already existing worker_id

This commit is contained in:
Thomas FORGIONE 2015-10-01 16:48:12 +02:00
parent 0c8338895a
commit f87765c0a5
1 changed files with 6 additions and 2 deletions

View File

@ -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,