diff options
Diffstat (limited to '')
-rw-r--r-- | config/email-settings.js | 4 | ||||
-rw-r--r-- | package.json | 4 | ||||
-rw-r--r-- | router.js | 24 | ||||
-rw-r--r-- | views/signup.ejs | 4 |
4 files changed, 31 insertions, 5 deletions
diff --git a/config/email-settings.js b/config/email-settings.js index ce65fe3..8bc9983 100644 --- a/config/email-settings.js +++ b/config/email-settings.js @@ -2,10 +2,12 @@ * Email settings */ -module.exports { +module.exports = { + host: 'localhost', user: 'divid', password: '', sender: 'Divid <divid@divid.no>' + } diff --git a/package.json b/package.json index b244bc5..7325e5c 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,8 @@ "ejs": "*", "mongoose": "*", "connect": "*", - "emailjs": "*" + "emailjs": "*", + "mongodb": "*", + "moment": "*" } } @@ -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 diff --git a/views/signup.ejs b/views/signup.ejs index 44579fe..b64845b 100644 --- a/views/signup.ejs +++ b/views/signup.ejs @@ -284,8 +284,8 @@ </div> </div> <div class="form-actions"> - <button type="button" id="account-form-btn1" class="btn"></button> - <button type="submit" id="account-form-btn2" class="btn"></button> + <button type="button" id="account-form-btn1" class="btn">Cancel</button> + <button type="submit" id="account-form-btn2" class="btn">Submit</button> </div> </fieldset> </form> |