From 257bf2623479db39e2a32f2257ea02b113756e7e Mon Sep 17 00:00:00 2001 From: Dennis Eriksen Date: Tue, 30 Apr 2013 09:09:12 +0200 Subject: changed port AGAIN --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index 492f8fe..f9aa1b9 100644 --- a/app.js +++ b/app.js @@ -10,7 +10,7 @@ var express = require('express') /** * App configuration */ -var port = process.env.PORT || 8001 +var port = process.env.PORT || 8000 , env = process.env.NODE_ENV || 'development' , config = require('./config/config')[env] , auth = require('./config/middlewares/authorization'); -- cgit v1.2.3 From f93cd061359f9060976d8209a0cc37d42b295edf Mon Sep 17 00:00:00 2001 From: Dennis Eriksen Date: Tue, 30 Apr 2013 09:09:55 +0200 Subject: working with project listing --- controllers/system.js | 19 ++++++++++++++----- views/dashboard.ejs | 4 +++- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/controllers/system.js b/controllers/system.js index e3a55bd..6bd9d22 100644 --- a/controllers/system.js +++ b/controllers/system.js @@ -54,11 +54,17 @@ exports.faq = function(req, res) { exports.dashboard = function(req, res) { console.log('/dashboard - ' + req.user); - res.render('dashboard', { - title: 'kanin', - loggedin: true + + Project.find(function(err, projects) { + if (err) return res.render('500'); + console.log(projects); + res.render('dashboard', { + title: 'Dashboad', + loggedin: true, + projects: projects + }); }); -}; +} @@ -73,7 +79,10 @@ exports.newProject = function(req, res) { exports.postNewProject = function(req, res) { var project = new Project(req.body); project.save(function(err) { - if (err) return res.render('newproject', { title: 'Nytt prosjekt - en feil oppstod', loggedin: true, errors: err.errors, project: project }); + if (err) { + console.log(err.errors); + return res.render('newproject', { title: 'Nytt prosjekt - en feil oppstod', loggedin: true, errors: err.errors, project: project }); + } return res.redirect('/dashboard'); }); } diff --git a/views/dashboard.ejs b/views/dashboard.ejs index 5eca9f1..a1f625a 100644 --- a/views/dashboard.ejs +++ b/views/dashboard.ejs @@ -12,10 +12,11 @@

Prosjekter

+ <% projects.forEach(function(project) { %>
-

dennisse/hytteturskogentilfrank

+

dennisse/<%= project.name %>

Meg, Robert, Turid-Laila, Kurt, Stian, Aleksander, Frank, Olav, Heidi, Anette, Kristine @@ -30,6 +31,7 @@
+ <% }); %>
-- cgit v1.2.3 From acbdbe45a76a2d7b93fe565d43cd9760fa6e2e71 Mon Sep 17 00:00:00 2001 From: Erling Aaby Date: Tue, 30 Apr 2013 09:12:06 +0200 Subject: Fixed desktop images for divid home --- public/img/dashboard.png | Bin 127906 -> 128952 bytes public/img/dashboard@2x.png | Bin 339575 -> 342282 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/public/img/dashboard.png b/public/img/dashboard.png index 1b82ffc..0fdbc1f 100644 Binary files a/public/img/dashboard.png and b/public/img/dashboard.png differ diff --git a/public/img/dashboard@2x.png b/public/img/dashboard@2x.png index 4f582b8..b154265 100644 Binary files a/public/img/dashboard@2x.png and b/public/img/dashboard@2x.png differ -- cgit v1.2.3 From d9adc8029baee3eebec8ec809e13ae867132b8f0 Mon Sep 17 00:00:00 2001 From: Dennis Eriksen Date: Tue, 30 Apr 2013 09:58:35 +0200 Subject: Added accessscema for project access --- models/access.js | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 models/access.js diff --git a/models/access.js b/models/access.js new file mode 100644 index 0000000..486ef5d --- /dev/null +++ b/models/access.js @@ -0,0 +1,28 @@ + +/** + * Module dependencies + */ + +var mongoose = require('mongoose') + , Schema = mongoose.Schema; + +var AccessSchema = new Schema({ + user: { type: String, ref: 'User' }, + creator: { type: String, ref: 'User' }, + project: { type: String, ref: 'Project' }, + permissions: { type: Number, default: '3' }, + created: { type: Date, default: Date.now }, + updated: { type: Date, default: Date.now } +}); + +// the four validations below only apply if you are signing up traditionally + +ProjectSchema.methods = { + + log: function() { + console.log('wat. wat logged this'); + } + +} + +mongoose.model('Access', AccessSchema); -- cgit v1.2.3 From 72de8d59b5ece58183eb65f0707e7fdf4d2d7f28 Mon Sep 17 00:00:00 2001 From: Dennis Eriksen Date: Tue, 30 Apr 2013 10:12:12 +0200 Subject: you now need to log in to see the dashboard --- router.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/router.js b/router.js index b67f03a..ae94779 100644 --- a/router.js +++ b/router.js @@ -50,7 +50,7 @@ module.exports = function(app, passport, auth) { */ - app.get('/dashboard', system.dashboard); + app.get('/dashboard', auth.requiresLogin, system.dashboard); app.get('/project', auth.requiresLogin, system.project); -- cgit v1.2.3 From 2a0dfb6928d30213fc539a5ce8a4718bb9c383d8 Mon Sep 17 00:00:00 2001 From: Erling Aaby Date: Tue, 30 Apr 2013 10:32:05 +0200 Subject: Changed icon mouseovers for Divid home --- public/img/androidA.png | Bin 5772 -> 12586 bytes public/img/androidA@2x.png | Bin 5059 -> 28174 bytes public/img/iphoneA.png | Bin 4283 -> 13721 bytes public/img/iphoneA@2x.png | Bin 5906 -> 35316 bytes public/img/winA.png | Bin 5296 -> 7287 bytes public/img/winA@2x.png | Bin 4678 -> 19201 bytes 6 files changed, 0 insertions(+), 0 deletions(-) diff --git a/public/img/androidA.png b/public/img/androidA.png index a0c2f94..910e2a5 100644 Binary files a/public/img/androidA.png and b/public/img/androidA.png differ diff --git a/public/img/androidA@2x.png b/public/img/androidA@2x.png index 5b80fd9..9df89ba 100644 Binary files a/public/img/androidA@2x.png and b/public/img/androidA@2x.png differ diff --git a/public/img/iphoneA.png b/public/img/iphoneA.png index 3d35eaf..bd6956f 100644 Binary files a/public/img/iphoneA.png and b/public/img/iphoneA.png differ diff --git a/public/img/iphoneA@2x.png b/public/img/iphoneA@2x.png index a341671..d8e2967 100644 Binary files a/public/img/iphoneA@2x.png and b/public/img/iphoneA@2x.png differ diff --git a/public/img/winA.png b/public/img/winA.png index b19d985..7395c40 100644 Binary files a/public/img/winA.png and b/public/img/winA.png differ diff --git a/public/img/winA@2x.png b/public/img/winA@2x.png index 638145e..bbe34b3 100644 Binary files a/public/img/winA@2x.png and b/public/img/winA@2x.png differ -- cgit v1.2.3 From 64394b06c07d5009a4c9557822e64f19e06bdef9 Mon Sep 17 00:00:00 2001 From: Erling Aaby Date: Tue, 30 Apr 2013 11:45:34 +0200 Subject: Changed icon mouseovers for Divid Home --- public/img/androidA.png | Bin 12586 -> 9055 bytes public/img/androidA@2x.png | Bin 28174 -> 22383 bytes public/img/iphoneA.png | Bin 13721 -> 9785 bytes public/img/iphoneA@2x.png | Bin 35316 -> 27306 bytes public/img/winA.png | Bin 7287 -> 6468 bytes public/img/winA@2x.png | Bin 19201 -> 16853 bytes 6 files changed, 0 insertions(+), 0 deletions(-) diff --git a/public/img/androidA.png b/public/img/androidA.png index 910e2a5..afb53f9 100644 Binary files a/public/img/androidA.png and b/public/img/androidA.png differ diff --git a/public/img/androidA@2x.png b/public/img/androidA@2x.png index 9df89ba..204c8d0 100644 Binary files a/public/img/androidA@2x.png and b/public/img/androidA@2x.png differ diff --git a/public/img/iphoneA.png b/public/img/iphoneA.png index bd6956f..0e0399a 100644 Binary files a/public/img/iphoneA.png and b/public/img/iphoneA.png differ diff --git a/public/img/iphoneA@2x.png b/public/img/iphoneA@2x.png index d8e2967..e519291 100644 Binary files a/public/img/iphoneA@2x.png and b/public/img/iphoneA@2x.png differ diff --git a/public/img/winA.png b/public/img/winA.png index 7395c40..62bdb33 100644 Binary files a/public/img/winA.png and b/public/img/winA.png differ diff --git a/public/img/winA@2x.png b/public/img/winA@2x.png index bbe34b3..cdb2313 100644 Binary files a/public/img/winA@2x.png and b/public/img/winA@2x.png differ -- cgit v1.2.3 From afd9ee0713c1f6deca72d7223d8cbe178e45831e Mon Sep 17 00:00:00 2001 From: Dennis Eriksen Date: Tue, 30 Apr 2013 12:24:59 +0200 Subject: made the dashboard list actice projects --- views/dashboard.ejs | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/views/dashboard.ejs b/views/dashboard.ejs index a1f625a..66dfa80 100644 --- a/views/dashboard.ejs +++ b/views/dashboard.ejs @@ -12,26 +12,26 @@

Prosjekter

- <% projects.forEach(function(project) { %> -
-
-
-

dennisse/<%= project.name %>

-
-
- Meg, Robert, Turid-Laila, Kurt, Stian, Aleksander, Frank, Olav, Heidi, Anette, Kristine -
-
- Oppgjør: -200 kr + <% projects.forEach(function(projects) { %> +
+
+
+

<%= projects.project.user.username %>/<%= projects.project.name %>

+
+
+ Meg, Robert, Turid-Laila, Kurt, Stian, Aleksander, Frank, Olav, Heidi, Anette, Kristine +
+
+ Oppgjør: -200 kr +
+
+

+

+
-
-

+

-
-
-
- <% }); %> +
+ <% }); %>
-- cgit v1.2.3 From f51fa5f8d2c29e0bccd13bf287f917aeb121ee5c Mon Sep 17 00:00:00 2001 From: Dennis Eriksen Date: Tue, 30 Apr 2013 12:25:23 +0200 Subject: made a function for returning all accesses for a user including their projects --- models/access.js | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/models/access.js b/models/access.js index 486ef5d..ab8d257 100644 --- a/models/access.js +++ b/models/access.js @@ -7,9 +7,9 @@ var mongoose = require('mongoose') , Schema = mongoose.Schema; var AccessSchema = new Schema({ - user: { type: String, ref: 'User' }, - creator: { type: String, ref: 'User' }, - project: { type: String, ref: 'Project' }, + user: { type: Schema.ObjectId, ref: 'User' }, + creator: { type: Schema.ObjectId, ref: 'User' }, + project: { type: Schema.ObjectId, ref: 'Project' }, permissions: { type: Number, default: '3' }, created: { type: Date, default: Date.now }, updated: { type: Date, default: Date.now } @@ -17,12 +17,27 @@ var AccessSchema = new Schema({ // the four validations below only apply if you are signing up traditionally -ProjectSchema.methods = { +AccessSchema.statics = { log: function() { console.log('wat. wat logged this'); + }, + + /** + * Load ALL accesses for a single user + * + * @param {ObjectId} id + * @param {Function} callback + * @api private + */ + + loadUser: function(id, callback) { + this.find({ user: id }) + .populate('user') + .populate('project') + .sort({ 'created': -1 }) // sort by date + .exec(callback); } - } mongoose.model('Access', AccessSchema); -- cgit v1.2.3 From 334cdccec27afcb1a353df49f7edb77181048843 Mon Sep 17 00:00:00 2001 From: Dennis Eriksen Date: Tue, 30 Apr 2013 12:25:44 +0200 Subject: made a function for returning project by ID --- models/project.js | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/models/project.js b/models/project.js index 2424694..2641fe5 100644 --- a/models/project.js +++ b/models/project.js @@ -6,12 +6,8 @@ var mongoose = require('mongoose') , Schema = mongoose.Schema; - - - - var ProjectSchema = new Schema({ - user: { type: String, ref: 'User' }, + user: { type: Schema.ObjectId, ref: 'User' }, name: { type: String, default: '', trim: true }, description: {type: String, default: '', trim: true }, currency: { type: String, default: 'kr', trim: true }, @@ -20,7 +16,6 @@ var ProjectSchema = new Schema({ updated: { type: Date, default: Date.now } }); - // the four validations below only apply if you are signing up traditionally ProjectSchema.path('name').validate(function(name) { @@ -28,12 +23,29 @@ ProjectSchema.path('name').validate(function(name) { return name.length; }, 'Project name cannot be blank'); -ProjectSchema.methods = { +ProjectSchema.statics = { log: function() { console.log('wat. wat logged this'); + }, + + + + /** + * Find project by id + * + * @param {ObjectId} id + * @param {Function} callback + * @api private + */ + + load: function(id, callback) { + this.findOne({ _id: id }) + .populate('user') + .exec(callback); } + } mongoose.model('Project', ProjectSchema); -- cgit v1.2.3 From ecee8a7e9ce62d36c11318c49f403a859a0b04e1 Mon Sep 17 00:00:00 2001 From: Dennis Eriksen Date: Tue, 30 Apr 2013 12:26:04 +0200 Subject: made the dashboard work somewhat better --- controllers/system.js | 56 ++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 49 insertions(+), 7 deletions(-) diff --git a/controllers/system.js b/controllers/system.js index 6bd9d22..ad5ced0 100644 --- a/controllers/system.js +++ b/controllers/system.js @@ -3,9 +3,9 @@ * Module dependencies */ var mongoose = require('mongoose') - , Project = mongoose.model('Project'); - - + , Project = mongoose.model('Project') + , Access = mongoose.model('Access') + , User = mongoose.model('User'); /** @@ -53,17 +53,46 @@ exports.faq = function(req, res) { exports.dashboard = function(req, res) { - console.log('/dashboard - ' + req.user); + console.log('/dashboard - ' + req.user._id); + +/* + Access.find({ user: req.user._id }, function(err, accesses) { + if (err) return res.render('500'); + console.log('accesses ' + accesses); + accesses.forEach(function(access) { + Project.load(access.project, function(err, project) { + if (err) return res.render('500'); + projectList.push(project); + console.log(project.user.username); + }); + }); + }); +*/ + Access.loadUser(req.user._id, function(err, projects) { + if (err) return res.render('500'); + Project.populate(projects, { path: 'project.user', model: User }, function(err, projects) { + + console.log('accesses: ' + projects); + + res.render('dashboard', { + title: 'Dashboard', + loggedin: true, + projects: projects + }); + }); + + }) + +/* Project.find(function(err, projects) { if (err) return res.render('500'); - console.log(projects); res.render('dashboard', { title: 'Dashboad', loggedin: true, projects: projects }); - }); + });*/ } @@ -78,12 +107,25 @@ exports.newProject = function(req, res) { exports.postNewProject = function(req, res) { var project = new Project(req.body); + project.user = req.user._id; project.save(function(err) { if (err) { console.log(err.errors); return res.render('newproject', { title: 'Nytt prosjekt - en feil oppstod', loggedin: true, errors: err.errors, project: project }); } - return res.redirect('/dashboard'); }); + + var access = new Access(); + access.user = req.user._id; + access.creator = req.user._id; + access.project = project._id; + access.permissions = 1; + access.save(function(err) { + if (err) { + console.log(err.errors); + return res.render('newproject', { title: 'Nytt prosjekt - en feil oppstod', loggedin: true }); + } + return res.redirect('/dashboard'); + }) } -- cgit v1.2.3 From 68503c27b6a4ea3c9dee7d97e64a5792aa26214f Mon Sep 17 00:00:00 2001 From: Erling Aaby Date: Tue, 30 Apr 2013 13:01:21 +0200 Subject: Changed img for pairs in divid home --- public/img/fest@2x.png | Bin 4389 -> 0 bytes public/img/par.png | Bin 6545 -> 3453 bytes public/img/par@2x.png | Bin 5110 -> 3900 bytes 3 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 public/img/fest@2x.png diff --git a/public/img/fest@2x.png b/public/img/fest@2x.png deleted file mode 100644 index 748ae2f..0000000 Binary files a/public/img/fest@2x.png and /dev/null differ diff --git a/public/img/par.png b/public/img/par.png index 5b9beb2..3637a8e 100644 Binary files a/public/img/par.png and b/public/img/par.png differ diff --git a/public/img/par@2x.png b/public/img/par@2x.png index 1797663..6c15675 100644 Binary files a/public/img/par@2x.png and b/public/img/par@2x.png differ -- cgit v1.2.3 From 9c06210e54b596140f0814da195b5fe37b44a2d2 Mon Sep 17 00:00:00 2001 From: Erling Aaby Date: Tue, 30 Apr 2013 13:02:19 +0200 Subject: Added fest@2x.png because of wrong deletion --- public/img/fest@2x.png | Bin 0 -> 4389 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 public/img/fest@2x.png diff --git a/public/img/fest@2x.png b/public/img/fest@2x.png new file mode 100644 index 0000000..748ae2f Binary files /dev/null and b/public/img/fest@2x.png differ -- cgit v1.2.3 From c0630c6db730ba50ab247435bff14a36a4303e93 Mon Sep 17 00:00:00 2001 From: Dennis Eriksen Date: Tue, 30 Apr 2013 13:28:45 +0200 Subject: added shorturl for projects --- models/project.js | 18 +++++++++++++++++- views/dashboard.ejs | 2 +- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/models/project.js b/models/project.js index 2641fe5..f29c7f8 100644 --- a/models/project.js +++ b/models/project.js @@ -13,7 +13,8 @@ var ProjectSchema = new Schema({ currency: { type: String, default: 'kr', trim: true }, public: { type: String, default: 'invite-only' }, created: { type: Date, default: Date.now }, - updated: { type: Date, default: Date.now } + updated: { type: Date, default: Date.now }, + shortURL: { type: String, unique: true } }); // the four validations below only apply if you are signing up traditionally @@ -23,6 +24,21 @@ ProjectSchema.path('name').validate(function(name) { return name.length; }, 'Project name cannot be blank'); + +ProjectSchema.pre('save', function(next) { + if (this.shortURL !== undefined) return next(); + var chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"; + this.shortURL = ''; + for (var i = 0; i < 6; i++) { + var x = Math.floor(Math.random() * chars.length); + this.shortURL += chars.charAt(x); + } + console.log('SHORT: ' + this.shortURL); + next(); +}); + + + ProjectSchema.statics = { log: function() { diff --git a/views/dashboard.ejs b/views/dashboard.ejs index 66dfa80..dfd76f6 100644 --- a/views/dashboard.ejs +++ b/views/dashboard.ejs @@ -16,7 +16,7 @@
-

<%= projects.project.user.username %>/<%= projects.project.name %>

+

<%= projects.project.user.username %>/<%= projects.project.name %>

Meg, Robert, Turid-Laila, Kurt, Stian, Aleksander, Frank, Olav, Heidi, Anette, Kristine -- cgit v1.2.3 From 698e59e4426448c2a0c55efb55f8cacb22ce3909 Mon Sep 17 00:00:00 2001 From: Dennis Eriksen Date: Tue, 30 Apr 2013 13:29:10 +0200 Subject: removed .populate('user') when we already know the user --- models/access.js | 1 - 1 file changed, 1 deletion(-) diff --git a/models/access.js b/models/access.js index ab8d257..ce75f8c 100644 --- a/models/access.js +++ b/models/access.js @@ -33,7 +33,6 @@ AccessSchema.statics = { loadUser: function(id, callback) { this.find({ user: id }) - .populate('user') .populate('project') .sort({ 'created': -1 }) // sort by date .exec(callback); -- cgit v1.2.3 From 7ef5bc29e6032ae9f7318ae5790e45057f7e5b4f Mon Sep 17 00:00:00 2001 From: Dennis Eriksen Date: Tue, 30 Apr 2013 13:31:00 +0200 Subject: renamed router to routes as it now contains more static routes, than actually working as a router --- app.js | 2 +- routes.js | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 routes.js diff --git a/app.js b/app.js index f9aa1b9..618ef8d 100644 --- a/app.js +++ b/app.js @@ -44,7 +44,7 @@ require('./config/express')(app, config, passport); /** * Routes */ -require('./router')(app, passport, auth); +require('./routes')(app, passport, auth); /** diff --git a/routes.js b/routes.js new file mode 100644 index 0000000..ae94779 --- /dev/null +++ b/routes.js @@ -0,0 +1,61 @@ + +/** + * Dependencies + */ + +var users = require('./controllers/users') + , system = require('./controllers/system'); + + +/* + * ============================================================ + * Routes + * + */ + +module.exports = function(app, passport, auth) { + app.get('/', system.index); + + app.get('/test', system.test); + + app.get('/home', system.home); + + app.get('/faq', system.faq); + + app.get('/login', users.login); + + app.get('/signup', users.signup); + + app.post('/signup', users.create); + + + app.post('/test', users.signin); + + app.get('/auth/facebook', passport.authenticate('facebook', { failureRedirect: '/test' }), users.signin); + + app.get('/auth/facebook/callback', passport.authenticate('facebook', { failureRedirect: '/test' }), function(req, res) { + console.log('/auth/facebook/callback --- ' + req.user.username); + res.redirect('/dashboard'); + }); + + app.get('/auth/twitter', passport.authenticate('twitter', { failureRedirect: '/test' }), users.signin); + app.get('/auth/twitter/callback', passport.authenticate('twitter', { failureRedirect: '/test' }), users.authCallback); + + app.get('/logout', users.logout); + + + /** + * REQUIRES LOGIN + * ============================================================ + */ + + + app.get('/dashboard', auth.requiresLogin, system.dashboard); + + + app.get('/project', auth.requiresLogin, system.project); + + app.get('/project/new', auth.requiresLogin, system.newProject); + + app.post('/project/new', auth.requiresLogin, system.postNewProject) +}; -- cgit v1.2.3 From 3a59f59037fbe8cdd51e5ce52c83ea70e1a973cb Mon Sep 17 00:00:00 2001 From: Dennis Eriksen Date: Tue, 30 Apr 2013 13:32:14 +0200 Subject: removed old router --- router.js | 61 ------------------------------------------------------------- 1 file changed, 61 deletions(-) delete mode 100644 router.js diff --git a/router.js b/router.js deleted file mode 100644 index ae94779..0000000 --- a/router.js +++ /dev/null @@ -1,61 +0,0 @@ - -/** - * Dependencies - */ - -var users = require('./controllers/users') - , system = require('./controllers/system'); - - -/* - * ============================================================ - * Routes - * - */ - -module.exports = function(app, passport, auth) { - app.get('/', system.index); - - app.get('/test', system.test); - - app.get('/home', system.home); - - app.get('/faq', system.faq); - - app.get('/login', users.login); - - app.get('/signup', users.signup); - - app.post('/signup', users.create); - - - app.post('/test', users.signin); - - app.get('/auth/facebook', passport.authenticate('facebook', { failureRedirect: '/test' }), users.signin); - - app.get('/auth/facebook/callback', passport.authenticate('facebook', { failureRedirect: '/test' }), function(req, res) { - console.log('/auth/facebook/callback --- ' + req.user.username); - res.redirect('/dashboard'); - }); - - app.get('/auth/twitter', passport.authenticate('twitter', { failureRedirect: '/test' }), users.signin); - app.get('/auth/twitter/callback', passport.authenticate('twitter', { failureRedirect: '/test' }), users.authCallback); - - app.get('/logout', users.logout); - - - /** - * REQUIRES LOGIN - * ============================================================ - */ - - - app.get('/dashboard', auth.requiresLogin, system.dashboard); - - - app.get('/project', auth.requiresLogin, system.project); - - app.get('/project/new', auth.requiresLogin, system.newProject); - - app.post('/project/new', auth.requiresLogin, system.postNewProject) -}; -- cgit v1.2.3