This commit is contained in:
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" });
|
||||
|
Loading…
Reference in New Issue
Block a user