aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/router.js
diff options
context:
space:
mode:
Diffstat (limited to 'router.js')
-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