diff options
Diffstat (limited to 'router.js')
-rw-r--r-- | router.js | 24 |
1 files changed, 23 insertions, 1 deletions
@@ -1,5 +1,6 @@ - +var AM = require('./modules/account-manager'); +var EM = require('./modules/email-dispatcher'); @@ -51,6 +52,27 @@ module.exports = function(app) { }); + /* POST */ + + app.post('/signup', function(req, res) { + AM.addNewAccount({ + name : req.param('name'), + email : req.param('email'), + user : req.param('user'), + pass : req.param('pass'), + country : req.param('country') + }, function(e) { + if (e) { + res.send(e, 400); + } else { + res.send('ok', 200); + } + }); + }); + + + + /* * ERRORS |