Last active
February 22, 2018 19:35
-
-
Save dantenovski/fc337060d74d05cfad44084b3e9c143c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
busboy.on('field', function(fieldname, val, fieldnameTruncated, valTruncated, encoding, mimetype) { | |
console.log('Field [' + fieldname + ']: value: ' + inspect(val)); | |
Account.register(new Account({ nickname: req.body.username, email: req.body.email }), req.body.passwordOne, (err, user) => { | |
if(err){ | |
helpers.errors(err, res); | |
} else { | |
helpers.registerSuccess(res); | |
} | |
}); | |
}); | |
busboy.on('finish', function() { | |
console.log('Done parsing form!'); | |
//res.writeHead(303, { Connection: 'close', Location: '/' }); | |
res.end(); | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment