}
// 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
})
} 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
})
}