add comments
All checks were successful
deploy / deploy (push) Successful in 37s

This commit is contained in:
Lee 2023-11-08 06:41:35 +00:00
parent 1532b0fb4a
commit 3f605dc15f

@ -10,6 +10,9 @@ import { normalizedRegionName } from "../utils/regionUtils";
let totalScores: number | undefined;
/**
* Updates the player count and adds data to influx
*/
async function update() {
const response = await axios.get("https://scoresaber.com/api/players/count");
const count = response.data;
@ -32,6 +35,9 @@ async function update() {
}
}
/**
* Connects to the scoresaber websocket and listens for new scores
*/
async function connectWebsocket() {
await connectMongo();
const leaderboard = await LeaderboardSchema.findOne({ _id: "scoresaber" });