remove passport file
remove unneeded comments
This commit is contained in:
@ -1,4 +1,7 @@
|
||||
module.exports = function mountLoopBackExplorer(app) {
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
return;
|
||||
}
|
||||
var explorer;
|
||||
try {
|
||||
explorer = require('loopback-explorer');
|
||||
|
@ -50,9 +50,9 @@ module.exports = function(app) {
|
||||
var fieldGuide = R.head(fieldGuideFromMongo);
|
||||
fieldGuide.name.toLowerCase().replace(/\s/g, '-').replace(/\?/g, '');
|
||||
|
||||
//if (fieldGuide.dashedName !== dashedNameFromQuery) {
|
||||
// if (fieldGuide.dashedName !== dashedNameFromQuery) {
|
||||
// return res.redirect('../field-guide/' + fieldGuide.dashedName);
|
||||
//}
|
||||
// }
|
||||
res.render('field-guide/show', {
|
||||
title: fieldGuide.name,
|
||||
fieldGuideId: fieldGuide.id,
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
module.exports = function(app) {
|
||||
var router = app.loopback.Router();
|
||||
var Nonprofit = app.models.Nonprofit;
|
||||
|
@ -1,71 +0,0 @@
|
||||
/*
|
||||
var passport = require('passport'),
|
||||
passportConf = require('../../config/passport');
|
||||
|
||||
module.exports = function(app) {
|
||||
var router = app.loopback.Router();
|
||||
var passportOptions = {
|
||||
successRedirect: '/',
|
||||
failureRedirect: '/login'
|
||||
};
|
||||
|
||||
router.all('/account', passportConf.isAuthenticated);
|
||||
|
||||
router.get('/auth/twitter', passport.authenticate('twitter'));
|
||||
|
||||
router.get(
|
||||
'/auth/twitter/callback',
|
||||
passport.authenticate('twitter', {
|
||||
successRedirect: '/',
|
||||
failureRedirect: '/login'
|
||||
})
|
||||
);
|
||||
|
||||
router.get(
|
||||
'/auth/linkedin',
|
||||
passport.authenticate('linkedin', {
|
||||
state: 'SOME STATE'
|
||||
})
|
||||
);
|
||||
|
||||
router.get(
|
||||
'/auth/linkedin/callback',
|
||||
passport.authenticate('linkedin', passportOptions)
|
||||
);
|
||||
|
||||
router.get(
|
||||
'/auth/facebook',
|
||||
passport.authenticate('facebook', {scope: ['email', 'user_location']})
|
||||
);
|
||||
|
||||
router.get(
|
||||
'/auth/facebook/callback',
|
||||
passport.authenticate('facebook', passportOptions), function (req, res) {
|
||||
res.redirect(req.session.returnTo || '/');
|
||||
}
|
||||
);
|
||||
|
||||
router.get('/auth/github', passport.authenticate('github'));
|
||||
|
||||
router.get(
|
||||
'/auth/github/callback',
|
||||
passport.authenticate('github', passportOptions), function (req, res) {
|
||||
res.redirect(req.session.returnTo || '/');
|
||||
}
|
||||
);
|
||||
|
||||
router.get(
|
||||
'/auth/google',
|
||||
passport.authenticate('google', {scope: 'profile email'})
|
||||
);
|
||||
|
||||
router.get(
|
||||
'/auth/google/callback',
|
||||
passport.authenticate('google', passportOptions), function (req, res) {
|
||||
res.redirect(req.session.returnTo || '/');
|
||||
}
|
||||
);
|
||||
|
||||
app.use(router);
|
||||
};
|
||||
*/
|
@ -42,8 +42,7 @@ module.exports = function(app) {
|
||||
return hotness;
|
||||
}
|
||||
|
||||
function hotJSON(req, res, next) { // no-unused-vars
|
||||
|
||||
function hotJSON(req, res, next) {
|
||||
Story.find({order: 'timePosted DESC', limit: 1000}, function(err, stories) {
|
||||
if (err) {
|
||||
return next(err);
|
||||
|
Reference in New Issue
Block a user