]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - lib/poolRequests.js
Standard v6
[github/Chocobozzz/PeerTube.git] / lib / poolRequests.js
index 5b7d5489d071766f6b91e3870045704c61d8f6a3..9ea41f383d9005d36316ff2922e2b12650f061b7 100644 (file)
@@ -41,7 +41,7 @@
         }
 
         // Remove the request of the other type
-        PoolRequests.removeById(id, function (err) {
+        PoolRequests.removeRequestById(id, function (err) {
           if (err) {
             logger.error('Cannot remove a pool request.', { error: err })
             return // Abort
@@ -49,7 +49,7 @@
         })
       } else {
         PoolRequests.create(id, type, request, function (err) {
-          logger.error('Cannot create a pool request.', { error: err })
+          if (err) logger.error('Cannot create a pool request.', { error: err })
           return // Abort
         })
       }