From 11c2bf637432474779434af28b5a7c6c3c22232c Mon Sep 17 00:00:00 2001 From: HardiReady Date: Sun, 15 Apr 2018 16:36:47 +0200 Subject: [PATCH] Fix end budget parsing --- api/tools/log-parse-tool.js | 6 ++---- package.json | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/api/tools/log-parse-tool.js b/api/tools/log-parse-tool.js index 0486a2c..299016c 100644 --- a/api/tools/log-parse-tool.js +++ b/api/tools/log-parse-tool.js @@ -102,12 +102,10 @@ const parseWarLog = (lineArray, war) => { // this date needs to be assigned in first place !important const dateString = budg[0].slice(0, -1).split('/').map((s) => parseInt(s)); stats.war.date = new Date(dateString[0], dateString[1] - 1, dateString[2]); - console.log(war.date); } else if (line.includes('Endbudget')) { - stats.war['endBudgetBlufor'] = transformMoneyString(budg[9].substr(1)); - stats.war['endBudgetOpfor'] = transformMoneyString(budg[12].slice(0, -1)); + stats.war['endBudgetBlufor'] = transformMoneyString(budg[9]); + stats.war['endBudgetOpfor'] = transformMoneyString(budg[12].slice(0, -2)); stats.war.endDate = getFullTimeDate(war.date, budg[5]); - console.log(war.endDate); } else { stats.budget.push(getBudgetEntry(budg, war._id, war.date)); } diff --git a/package.json b/package.json index 59608ba..5658cf1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "opt-cc", - "version": "1.7.2", + "version": "1.7.3", "author": "Florian Hartwich ", "private": true, "scripts": { -- 2.25.1