We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4f5882d commit 0357338Copy full SHA for 0357338
1 file changed
src/db/functions/playerTimes25.ts
@@ -1,11 +1,14 @@
1
import { eq } from "drizzle-orm";
2
import { db, playerTimes25Table } from "#db";
3
+import { log } from "#util";
4
5
export function getTimeData(data: typeof playerTimes25Table.$inferSelect) {
6
return Object.entries(data.servers).filter((x): x is [string, NonNullable<typeof x[1]>] => x[1] !== null);
7
}
8
9
export async function addPlayerTime(playerName: string, playerTime: number, serverAcro: string) {
10
+ if (playerName.length > 99) return log("yellow", `Skipping addPlayerTime due to length: "${playerName}"`);
11
+
12
const now = Math.floor(Date.now() / 1_000);
13
const playerTimesData = await getPlayerTimesRow(playerName);
14
0 commit comments