diff --git a/src/services/updateData.ts b/src/services/updateData.ts index 723d9ac..1c81c29 100644 --- a/src/services/updateData.ts +++ b/src/services/updateData.ts @@ -96,13 +96,13 @@ async function connectWebsocket() { .timestamp(new Date()); if (baseScore && maxScore) { - scorePoint.floatField("acc", (baseScore / maxScore) * 100); + scorePoint.floatField("acc", ((baseScore / maxScore) * 100).toFixed(2)); } if (stars) { scorePoint.floatField("stars", stars); } if (pp) { - scorePoint.floatField("pp", pp); + scorePoint.floatField("pp", pp.toFixed(2)); } if (missedNotes) { scorePoint.intField("missed_notes", missedNotes); @@ -113,9 +113,9 @@ async function connectWebsocket() { if (rank) { scorePoint.intField("rank", rank); } - if (leaderboardId) { - scorePoint.intField("leaderboard_id", leaderboardId); - } + // if (leaderboardId) { + // scorePoint.intField("leaderboard_id", leaderboardId); + // } if (hmdName) { scorePoint.stringField("hmd", hmdName); } @@ -125,7 +125,7 @@ async function connectWebsocket() { if (maxCombo) { scorePoint.intField("max_combo", maxCombo); } - scorePoint.intField("player_id", player.id); + //scorePoint.intField("player_id", player.id); // Write the data to influx InfluxWriteAPI.writePoint(scorePoint); @@ -135,8 +135,6 @@ async function connectWebsocket() { .intField("value", totalScores) .timestamp(new Date()) ); - - InfluxWriteAPI.flush(); // temp } }; }