Add playtypes to importDoc

This commit is contained in:
zkldi
2021-10-28 20:14:24 +01:00
parent 4d939566dd
commit b09ac66b46
4 changed files with 8 additions and 5 deletions
+1 -1
View File
@@ -77,7 +77,7 @@
"redis": "3.1.2",
"rimraf": "3.0.2",
"safe-json-stringify": "1.2.0",
"tachi-common": "0.2.35",
"tachi-common": "0.2.36",
"ts-node": "10.0.0",
"typescript": "4.3.4",
"winston": "3.3.3",
+4 -4
View File
@@ -59,7 +59,7 @@ specifiers:
rimraf: 3.0.2
safe-json-stringify: 1.2.0
supertest: 6.1.3
tachi-common: 0.2.35
tachi-common: 0.2.36
tap: 15.0.9
ts-node: 10.0.0
tsconfig-paths: 3.10.1
@@ -100,7 +100,7 @@ dependencies:
redis: 3.1.2
rimraf: 3.0.2
safe-json-stringify: 1.2.0
tachi-common: 0.2.35
tachi-common: 0.2.36
ts-node: 10.0.0_83f53b0a0c5616d3fa00ed4e30b9ce1b
typescript: 4.3.4
winston: 3.3.3
@@ -4189,8 +4189,8 @@ packages:
strip-ansi: 6.0.0
dev: true
/tachi-common/0.2.35:
resolution: {integrity: sha512-AefVkriGKlpamGA+JTl67qpv4HiZ6sYxCVCZXXvnUXJZiGfsh7dhrqVqXngfxPQjg3mLD81MbZrTNv1HsgwGJQ==}
/tachi-common/0.2.36:
resolution: {integrity: sha512-4/enfkwE8HA4x4vrbNMrhLx2j/8JGnEMwAO5b0zSM150chDZiK30vXOmDW1IHSqxoIRZVuIyRqP7aEyUbf7FKA==}
dependencies:
monk: 7.3.4
transitivePeerDependencies:
+2
View File
@@ -559,6 +559,8 @@ export const DatabaseSchemas: Record<Databases, ValidatorFunction> = {
importID: "string",
scoreIDs: ["string"],
game: p.isIn(games),
// @ts-expect-error We've asserted this is definitely a game.
playtypes: [(self) => p.isIn(GetGameConfig(self.game).validPlaytypes)(self)],
errors: [
{
type: "string",
@@ -188,6 +188,7 @@ export default async function ScoreImportMain<D, C>(
importType,
idStrings: playtypes.map((e) => `${game}:${e}`) as IDStrings[],
scoreIDs,
playtypes,
game,
errors,
importID,