fix auto create worker with right password

This commit is contained in:
k7 2014-04-21 23:58:50 +08:00
parent 882f779e20
commit 75c091457b
1 changed files with 2 additions and 2 deletions

View File

@ -63,8 +63,8 @@ module.exports = function(logger, poolConfig){
authCallback(false);
}else{
connection.query(
"INSERT INTO `pool_worker` (`id`, `account_id`, `username`, `password`, `difficulty`, `monitor`) VALUES (NULL, ?, ?, '123', '0', '0');",
[result[0].id,workerName.toLowerCase()],
"INSERT INTO `pool_worker` (`id`, `account_id`, `username`, `password`, `difficulty`, `monitor`) VALUES (NULL, ?, ?, ?, '0', '0');",
[result[0].id,workerName.toLowerCase(),password],
function(err, result){
if (err){
logger.error(logIdentify, logComponent, 'Database error when insert worker: ' +