From 9c6e5514f0e39a68b32062958d695fc613b98ca3 Mon Sep 17 00:00:00 2001 From: Amos Haviv Date: Fri, 20 Dec 2013 14:14:54 +0200 Subject: [PATCH] Moving from Underscore to LoDash --- app/controllers/articles.js | 5 +++-- app/controllers/index.js | 3 +-- app/models/user.js | 1 - config/config.js | 2 +- package.json | 2 +- 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/app/controllers/articles.js b/app/controllers/articles.js index 0125fbfafa..011ce3f6a9 100644 --- a/app/controllers/articles.js +++ b/app/controllers/articles.js @@ -3,7 +3,7 @@ */ var mongoose = require('mongoose'), Article = mongoose.model('Article'), - _ = require('underscore'); + _ = require('lodash'); /** @@ -78,6 +78,7 @@ exports.show = function(req, res) { * List of Articles */ exports.all = function(req, res) { + console.log(req.user.password); Article.find().sort('-created').populate('user', 'name username').exec(function(err, articles) { if (err) { res.render('error', { @@ -87,4 +88,4 @@ exports.all = function(req, res) { res.jsonp(articles); } }); -}; +}; \ No newline at end of file diff --git a/app/controllers/index.js b/app/controllers/index.js index c775a01667..e547ac50ea 100644 --- a/app/controllers/index.js +++ b/app/controllers/index.js @@ -1,8 +1,7 @@ /** * Module dependencies. */ -var mongoose = require('mongoose'), - _ = require('underscore'); +var mongoose = require('mongoose'); exports.render = function(req, res) { diff --git a/app/models/user.js b/app/models/user.js index 074604f808..4befd08903 100755 --- a/app/models/user.js +++ b/app/models/user.js @@ -4,7 +4,6 @@ var mongoose = require('mongoose'), Schema = mongoose.Schema, crypto = require('crypto'), - _ = require('underscore'), authTypes = ['github', 'twitter', 'facebook', 'google']; diff --git a/config/config.js b/config/config.js index d3394b4e78..aeec0cc264 100644 --- a/config/config.js +++ b/config/config.js @@ -1,4 +1,4 @@ -var _ = require('underscore'); +var _ = require('lodash'); // Load app configuration diff --git a/package.json b/package.json index 8f502ec3b5..1a33578105 100755 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "passport-twitter": "latest", "passport-github": "latest", "passport-google-oauth": "latest", - "underscore": "latest", + "lodash": "latest", "async": "latest", "view-helpers": "latest", "mean-logger": "latest",