fix utils/misc.ts to use new config

This commit is contained in:
zkldi
2021-06-20 15:34:04 +01:00
parent cb8300b7ca
commit 08a511cfd1
+2 -3
View File
@@ -1,7 +1,6 @@
import crypto from "crypto";
import { CONF_INFO } from "../lib/setup/config";
import { Game, Playtypes } from "tachi-common";
import { validPlaytypes } from "tachi-common/js/config";
import { Game, Playtypes, GetGameConfig } from "tachi-common";
// https://github.com/sindresorhus/escape-string-regexp/blob/main/index.js
// the developer of this has migrated everything to Force ES6 style modules,
@@ -67,5 +66,5 @@ export function IsValidGame(str: string): str is Game {
}
export function IsValidPlaytype(game: Game, str: string): str is Playtypes[Game] {
return validPlaytypes[game].includes(str as Playtypes[Game]);
return GetGameConfig(game).validPlaytypes.includes(str as Playtypes[Game]);
}