diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-03-18 16:34:50 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-03-18 16:34:50 +0100 |
commit | a4c157519738d89f8a77143b91e92dfd2e70380a (patch) | |
tree | fced708de0559a3f71712d79286d29d80641bd52 /server/controllers/api/v1 | |
parent | 2df82d42cb57783cd90ccfc11fc8ffe4b95ebb70 (diff) | |
download | PeerTube-a4c157519738d89f8a77143b91e92dfd2e70380a.tar.gz PeerTube-a4c157519738d89f8a77143b91e92dfd2e70380a.tar.zst PeerTube-a4c157519738d89f8a77143b91e92dfd2e70380a.zip |
Use map instead of pluck (lodash)
Diffstat (limited to 'server/controllers/api/v1')
-rw-r--r-- | server/controllers/api/v1/remoteVideos.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/controllers/api/v1/remoteVideos.js b/server/controllers/api/v1/remoteVideos.js index 58222de52..2437b8c44 100644 --- a/server/controllers/api/v1/remoteVideos.js +++ b/server/controllers/api/v1/remoteVideos.js | |||
@@ -1,7 +1,7 @@ | |||
1 | 'use strict' | 1 | 'use strict' |
2 | 2 | ||
3 | const express = require('express') | 3 | const express = require('express') |
4 | const pluck = require('lodash-node/compat/collection/pluck') | 4 | const map = require('lodash-node/modern/collection/map') |
5 | 5 | ||
6 | const middleware = require('../../../middlewares') | 6 | const middleware = require('../../../middlewares') |
7 | const secureMiddleware = middleware.secure | 7 | const secureMiddleware = middleware.secure |
@@ -43,7 +43,7 @@ function addRemoteVideos (req, res, next) { | |||
43 | 43 | ||
44 | function removeRemoteVideo (req, res, next) { | 44 | function removeRemoteVideo (req, res, next) { |
45 | const url = req.body.signature.url | 45 | const url = req.body.signature.url |
46 | const magnetUris = pluck(req.body.data, 'magnetUri') | 46 | const magnetUris = map(req.body.data, 'magnetUri') |
47 | 47 | ||
48 | videos.removeRemotesOfByMagnetUris(url, magnetUris, function (err) { | 48 | videos.removeRemotesOfByMagnetUris(url, magnetUris, function (err) { |
49 | if (err) return next(err) | 49 | if (err) return next(err) |