Blame view
lib/report/postpaid.js
576 Bytes
92940f844
|
1 2 3 |
const MODULE_NAME = 'REPORT.POSTPAID'; const stringify = require('json-stringify-pretty-compact'); |
3d8701130
|
4 |
const logger = require('tektrans-logger'); |
92940f844
|
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
const postpaidSdk = require('komodo-sdk-postpaid'); module.exports = (xid, data) => { if (!data) return; logger.verbose(`${MODULE_NAME} 0682477A: Reporting to CORE`, { xid, data, }); const reportData = JSON.parse(JSON.stringify(data)); if (typeof reportData.message !== 'string') { reportData.message = stringify(reportData.message); } postpaidSdk.report(reportData, xid); }; |