Compare commits

..

1 Commits

Author SHA1 Message Date
ihsan b206b50968 update card history 2024-10-11 16:38:05 +07:00
3 changed files with 1537 additions and 1591 deletions
@@ -91,8 +91,8 @@ const cardHistory = async (req, res) => {
new Date((parseInt(element.slice(0, 8), 16) + 946684800) * 1000) new Date((parseInt(element.slice(0, 8), 16) + 946684800) * 1000)
).format('YYYY-MM-DD HH:mm:ss'); ).format('YYYY-MM-DD HH:mm:ss');
nominal = parseInt(element.slice(8, 16), 16); nominal = parseInt(element.slice(8, 16), 16);
mid = element.slice(16, 20); mid = element.slice(16, 20).toUpperCase();
tid = element.slice(20, 24); tid = element.slice(20, 24).toUpperCase();
// blok yang menandakan konten untuk reska // blok yang menandakan konten untuk reska
checkReskaFormat = element.slice(14, 20); checkReskaFormat = element.slice(14, 20);
@@ -198,6 +198,14 @@ const history = async (req, res) => {
// param // param
let { mid, tid, card_number, start_date, end_date } = req.body; let { mid, tid, card_number, start_date, end_date } = req.body;
if (mid) {
mid = mid.toUpperCase();
}
if (tid) {
tid = tid.toUpperCase();
}
// log info // log info
winston.logger.info( winston.logger.info(
`${uniqueCode} [ REQUEST CARD-HISTORY-FROM-CMS ]: ${JSON.stringify( `${uniqueCode} [ REQUEST CARD-HISTORY-FROM-CMS ]: ${JSON.stringify(
+1522 -1584
View File
File diff suppressed because it is too large Load Diff
+5 -5
View File
@@ -22,7 +22,7 @@
}, },
"homepage": "https://github.com/mohamadihsan/topuponline#readme", "homepage": "https://github.com/mohamadihsan/topuponline#readme",
"dependencies": { "dependencies": {
"axios": "^0.27.2", "axios": "^1.7.7",
"bcrypt": "^5.0.1", "bcrypt": "^5.0.1",
"body-parser": "^1.19.0", "body-parser": "^1.19.0",
"check-internet-connected": "^2.0.6", "check-internet-connected": "^2.0.6",
@@ -32,8 +32,8 @@
"express": "^4.17.1", "express": "^4.17.1",
"express-validator": "^6.10.0", "express-validator": "^6.10.0",
"express-winston": "^4.2.0", "express-winston": "^4.2.0",
"jsonwebtoken": "^8.5.1", "jsonwebtoken": "^9.0.2",
"knex": "^0.95.4", "knex": "^3.1.0",
"moment": "^2.29.3", "moment": "^2.29.3",
"node-cron": "^3.0.1", "node-cron": "^3.0.1",
"pg": "^8.6.0", "pg": "^8.6.0",
@@ -41,12 +41,12 @@
"prom-client": "^14.2.0", "prom-client": "^14.2.0",
"redis": "^4.6.5", "redis": "^4.6.5",
"response-time": "^2.3.2", "response-time": "^2.3.2",
"sticky-session": "^1.1.2", "sticky-session": "^0.1.0",
"winston": "^3.7.2", "winston": "^3.7.2",
"winston-daily-rotate-file": "^4.7.1", "winston-daily-rotate-file": "^4.7.1",
"winston-loki": "^6.0.6", "winston-loki": "^6.0.6",
"ws": "^8.5.0", "ws": "^8.5.0",
"xml2js": "^0.4.23" "xml2js": "^0.6.2"
}, },
"devDependencies": { "devDependencies": {
"jest": "^29.0.2", "jest": "^29.0.2",