Use lodash v4
authorChocobozzz <florian.bigard@gmail.com>
Tue, 19 Apr 2016 20:06:46 +0000 (22:06 +0200)
committerChocobozzz <florian.bigard@gmail.com>
Tue, 19 Apr 2016 20:06:46 +0000 (22:06 +0200)
package.json
server/lib/poolRequests.js

index 678804ed2414fab97e0d79895be64c01a3d8794b..242e1beb2db0721c1ef8540fa0ebf51bf086413f 100644 (file)
@@ -51,7 +51,7 @@
     "express-oauth-server": "https://github.com/Chocobozzz/express-oauth-server",
     "express-validator": "^2.11.0",
     "js-yaml": "^3.5.4",
-    "lodash-node": "^3.10.2",
+    "lodash": "^4.11.1",
     "mkdirp": "^0.5.1",
     "mongoose": "^4.0.5",
     "morgan": "^1.5.3",
index 2eb501311d487ade69def8081ba7730c55fa9985..6fe0cb1858240bf5313eb8201eb7619320c28fc3 100644 (file)
@@ -1,7 +1,7 @@
 'use strict'
 
 const async = require('async')
-const pluck = require('lodash-node/compat/collection/pluck')
+const map = require('lodash-node/compat/collection/map')
 
 const constants = require('../initializers/constants')
 const logger = require('../helpers/logger')
@@ -184,8 +184,8 @@ function removeBadPods () {
 
     if (pods.length === 0) return
 
-    const urls = pluck(pods, 'url')
-    const ids = pluck(pods, '_id')
+    const urls = map(pods, 'url')
+    const ids = map(pods, '_id')
 
     Videos.removeAllRemotesOf(urls, function (err, r) {
       if (err) {