stats table

This commit is contained in:
yohlo
2025-09-13 15:21:23 -05:00
parent 3be2284da9
commit 4bc25fb0bc
7 changed files with 328 additions and 5 deletions

View File

@@ -123,6 +123,12 @@ export const getUnassociatedPlayers = createServerFn()
export const getPlayerStats = createServerFn()
.validator(z.string())
.middleware([superTokensFunctionMiddleware])
.handler(async ({ data }) =>
.handler(async ({ data }) =>
toServerResult<PlayerStats[]>(async () => await pbAdmin.getPlayerStats(data))
);
export const getAllPlayerStats = createServerFn()
.middleware([superTokensFunctionMiddleware])
.handler(async () =>
toServerResult<PlayerStats[]>(async () => await pbAdmin.getAllPlayerStats())
);