doTextResponse(sender, responseText) { console.log('Response as text message'); // facebook API limit for text length is 640, // so we must split message if needed let splittedText = this.splitResponse(responseText); async.eachSeries(splittedText, (textPart, callback) => { this.sendFBMessage(sender, {text: textPart}) .then(() => callback()) .catch(err => callback(err)); }); }
transaction.getSumOfColumnFiltered('amount_refunded', null, null, function (totalRefundAmount) { let total = (totalRefundAmount == null ? 0 : totalRefundAmount); callback(null, total); });
router.post("/roles/manage-permissions", auth(), function(req, res, next){ async.mapSeries(req.body, function(role, callback) { let roleObj = new Roles({id: role.role_id}); roleObj.setPermissions(role.permission_ids, function (result) { callback(null, result); }); },function(err, result){ if(err){ console.error(err); }else { res.json(result); } }); });
serviceInstance.getRowCountByKey(null, null, function (totalInstances) { callback(null, totalInstances); });
transaction.getSumOfColumnFiltered('amount', 'paid', 'true', function (totalSales) { let total = (totalSales == null ? 0 : totalSales); callback(null, total); });
serviceInstance.getRowCountByKey('status', 'waiting', function (totalInstances) { callback(null, totalInstances); });
user.getRowCountByKey(null, null, function (totalCustomers) { callback(null, totalCustomers); });
serviceInstance.getRowCountByKey('status', 'cancelled', function (totalInstances) { callback(null, totalInstances); });
webhook.getRowCountByKey(null, null, (total) => { callback(null, total); })
serviceTemplate.getRowCountByKey('published', 'false', function (totalUnpublishedTemplates) { callback(null, totalUnpublishedTemplates); });
serviceInstance.getRowCountByKey('status', 'running', function (totalInstances) { callback(null, totalInstances); });
charge.getRowCountByKey('approved', 'false', function (totalUnsuccessfulCharges) { callback(null, totalUnsuccessfulCharges); });
serviceInstanceCancellation.getRowCountByKey(null, null, function (totalCancellations) { callback(null, totalCancellations); });
fund.getRowCountByKey('flagged', 'true', function (totalUsers) { callback(null, totalUsers); });
serviceInstance.getRowCountByKey('status', 'waiting_cancellation', function (totalInstances) { callback(null, totalInstances); });