remove leaderboard_id and player_id - should help save data

This commit is contained in:
Lee 2023-10-31 13:54:33 +00:00
parent bd992ad0e5
commit 9f66300b35

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