From 9f66300b35ad9dd58139af9cf34da34aeddfe27e Mon Sep 17 00:00:00 2001 From: Liam Date: Tue, 31 Oct 2023 13:54:33 +0000 Subject: [PATCH] remove leaderboard_id and player_id - should help save data --- src/services/updateData.ts | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) 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 } }; }