]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/helpers/requests.js
Server: move remote routes in their own directory
[github/Chocobozzz/PeerTube.git] / server / helpers / requests.js
index 06109ce168d4e8182248590e510aa7950889dc59..b0cda09fe02452a520072f230288148ae5af3bbe 100644 (file)
@@ -44,21 +44,8 @@ function makeSecureRequest (params, callback) {
 
     // If there are data informations
     if (params.data) {
-      // Encrypt data
-      if (params.encrypt === true) {
-        peertubeCrypto.encrypt(params.toPod.publicKey, JSON.stringify(params.data), function (err, encrypted) {
-          if (err) return callback(err)
-
-          requestParams.json.data = encrypted.data
-          requestParams.json.key = encrypted.key
-
-          request.post(requestParams, callback)
-        })
-      } else {
-        // No encryption
-        requestParams.json.data = params.data
-        request.post(requestParams, callback)
-      }
+      requestParams.json.data = params.data
+      request.post(requestParams, callback)
     } else {
       // No data
       request.post(requestParams, callback)