diff options
Diffstat (limited to 'lib/poolRequests.js')
-rw-r--r-- | lib/poolRequests.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/poolRequests.js b/lib/poolRequests.js index 5b7d5489d..9ea41f383 100644 --- a/lib/poolRequests.js +++ b/lib/poolRequests.js | |||
@@ -41,7 +41,7 @@ | |||
41 | } | 41 | } |
42 | 42 | ||
43 | // Remove the request of the other type | 43 | // Remove the request of the other type |
44 | PoolRequests.removeById(id, function (err) { | 44 | PoolRequests.removeRequestById(id, function (err) { |
45 | if (err) { | 45 | if (err) { |
46 | logger.error('Cannot remove a pool request.', { error: err }) | 46 | logger.error('Cannot remove a pool request.', { error: err }) |
47 | return // Abort | 47 | return // Abort |
@@ -49,7 +49,7 @@ | |||
49 | }) | 49 | }) |
50 | } else { | 50 | } else { |
51 | PoolRequests.create(id, type, request, function (err) { | 51 | PoolRequests.create(id, type, request, function (err) { |
52 | logger.error('Cannot create a pool request.', { error: err }) | 52 | if (err) logger.error('Cannot create a pool request.', { error: err }) |
53 | return // Abort | 53 | return // Abort |
54 | }) | 54 | }) |
55 | } | 55 | } |