From a4c157519738d89f8a77143b91e92dfd2e70380a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 18 Mar 2016 16:34:50 +0100 Subject: Use map instead of pluck (lodash) --- server/controllers/api/v1/remoteVideos.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/controllers') 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 @@ 'use strict' const express = require('express') -const pluck = require('lodash-node/compat/collection/pluck') +const map = require('lodash-node/modern/collection/map') const middleware = require('../../../middlewares') const secureMiddleware = middleware.secure @@ -43,7 +43,7 @@ function addRemoteVideos (req, res, next) { function removeRemoteVideo (req, res, next) { const url = req.body.signature.url - const magnetUris = pluck(req.body.data, 'magnetUri') + const magnetUris = map(req.body.data, 'magnetUri') videos.removeRemotesOfByMagnetUris(url, magnetUris, function (err) { if (err) return next(err) -- cgit v1.2.3