Fix invalid game-stats-snapshots schema again

This commit is contained in:
zkldi
2021-11-25 05:32:37 +00:00
parent 3f9da76de8
commit 4ddd36ac08
+4 -1
View File
@@ -397,7 +397,10 @@ export const DatabaseSchemas: Record<Databases, ValidatorFunction> = {
return prSchemaify(
Object.assign(PR_GameStats(game, playtype, gptConfig), {
rankings: Object.fromEntries(
gptConfig.profileRatingAlgs.map((e) => [e, p.isPositiveNonZeroInteger])
gptConfig.profileRatingAlgs.map((e) => [
e,
{ outOf: p.isPositiveNonZeroInteger, ranking: p.isPositiveNonZeroInteger },
])
),
playcount: p.isPositiveInteger,
timestamp: p.isPositive,