-
Notifications
You must be signed in to change notification settings - Fork 111
/
Copy pathroutes.js
30 lines (27 loc) · 850 Bytes
/
routes.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
var website = require('./controllers/website'),
admin = require('./controllers/admin');
module.exports = function (app, passport) {
/*
* Website urls
*/
app.get('/', website.index);
app.get('/salir', website.salir);
/*
* Admin urls
*/
app.get('/admin', admin.index);
app.post('/admin/update', admin.update);
/*
* Passport urls
*/
// Twitter
app.get('/auth/twitter', passport.authenticate('twitter'));
app.get('/auth/twitter/callback',
passport.authenticate('twitter', { successRedirect: '/',
failureRedirect: '/' }));
// Facebook
app.get('/auth/facebook', passport.authenticate('facebook'));
app.get('/auth/facebook/callback',
passport.authenticate('facebook', { successRedirect: '/',
failureRedirect: '/' }));
};