diff options
author | Dennis Eriksen <dennis.se@gmail.com> | 2013-04-30 13:32:14 +0200 |
---|---|---|
committer | Dennis Eriksen <dennis.se@gmail.com> | 2013-04-30 13:32:14 +0200 |
commit | 3a59f59037fbe8cdd51e5ce52c83ea70e1a973cb (patch) | |
tree | ff649b2cca165e282271623c36b85aae52eee638 | |
parent | renamed router to routes as it now contains more static routes, than actually... (diff) | |
download | Divid-3a59f59037fbe8cdd51e5ce52c83ea70e1a973cb.tar.gz |
removed old router
-rw-r--r-- | router.js | 61 |
1 files changed, 0 insertions, 61 deletions
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) -}; |