aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/router.js
diff options
context:
space:
mode:
authorDennis Eriksen <dennis.se@gmail.com>2013-03-29 15:30:08 +0100
committerDennis Eriksen <dennis.se@gmail.com>2013-03-29 15:30:08 +0100
commita3887e93387e8f4f3bca478624d10a0316273693 (patch)
tree973ffb67d929718df7a03d8049fa4b499884cf04 /router.js
parentmade a few changes (diff)
downloadDivid-a3887e93387e8f4f3bca478624d10a0316273693.tar.gz
making signup
Diffstat (limited to '')
-rw-r--r--router.js24
1 files changed, 23 insertions, 1 deletions
diff --git a/router.js b/router.js
index 3d9558c..ef95309 100644
--- a/router.js
+++ b/router.js
@@ -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