diff options
author | Dennis Eriksen <dennis.se@gmail.com> | 2013-03-29 15:30:08 +0100 |
---|---|---|
committer | Dennis Eriksen <dennis.se@gmail.com> | 2013-03-29 15:30:08 +0100 |
commit | a3887e93387e8f4f3bca478624d10a0316273693 (patch) | |
tree | 973ffb67d929718df7a03d8049fa4b499884cf04 /router.js | |
parent | made a few changes (diff) | |
download | Divid-a3887e93387e8f4f3bca478624d10a0316273693.tar.gz |
making signup
Diffstat (limited to '')
-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 |