Correction of verification of an already existing worker_id
This commit is contained in:
parent
0c8338895a
commit
f87765c0a5
|
@ -5,11 +5,15 @@ var Log = require('../../lib/NodeLog.js');
|
||||||
|
|
||||||
module.exports.index = function(req, res) {
|
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) {
|
if (!ok) {
|
||||||
|
|
||||||
db.createUser(
|
db.createUser(
|
||||||
req.session.workerId || req.body.inputId,
|
workerId,
|
||||||
req.body.inputAge,
|
req.body.inputAge,
|
||||||
req.body.inputGender === 'male',
|
req.body.inputGender === 'male',
|
||||||
req.body.input3dskills,
|
req.body.input3dskills,
|
||||||
|
|
Loading…
Reference in New Issue