aboutsummaryrefslogtreecommitdiff
path: root/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'controllers')
-rw-r--r--controllers/user.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/controllers/user.js b/controllers/user.js
new file mode 100644
index 0000000..e25abf8
--- /dev/null
+++ b/controllers/user.js
@@ -0,0 +1,25 @@
+module.exports = {
+
+ register(req, res) {
+ console.log(req.body);
+ res.redirect('/register');
+ },
+
+ login(req, res) {
+ console.log(req.body);
+ res.redirect('/login');
+ },
+
+ logout(req, res) {
+ res.redirect('/');
+ },
+
+ registerView(req, res) {
+ res.render('register', {title: 'Register', register: true});
+ },
+
+ loginView(req, res) {
+ res.render('login', {title: 'Login', login: true});
+ }
+
+};