aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/controllers/users.js
diff options
context:
space:
mode:
Diffstat (limited to 'controllers/users.js')
-rw-r--r--controllers/users.js15
1 files changed, 10 insertions, 5 deletions
diff --git a/controllers/users.js b/controllers/users.js
index af454b5..d465468 100644
--- a/controllers/users.js
+++ b/controllers/users.js
@@ -9,7 +9,6 @@ var mongoose = require('mongoose')
/**
* Login
*/
-
exports.login = function(req, res) {
res.render('login', {
title: 'Login'
@@ -21,8 +20,7 @@ exports.login = function(req, res) {
/**
* Logout
*/
-
-exports.logoug = function(req, res) {
+exports.logout = function(req, res) {
req.logout();
res.resirect('/test');
}
@@ -30,14 +28,21 @@ exports.logoug = function(req, res) {
/**
* Signin
+ * This is triggered when the user post to /login
*/
-
exports.signin = function(req, res) {}
+
/**
- * Create users
+ * Signup
*/
+exports.signup = function(req, res) {
+ res.render('signup', { title: 'Registrer deg' });
+}
+/**
+ * Create users
+ */
exports.create = function(req, res) {
var user = new User(req.body);
user.provider = 'local';