From 08a511cfd1304a124bbf77ecdd74dfd4c207a4a2 Mon Sep 17 00:00:00 2001 From: zkldi Date: Sun, 20 Jun 2021 15:34:04 +0100 Subject: [PATCH] fix utils/misc.ts to use new config --- server/src/utils/misc.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/server/src/utils/misc.ts b/server/src/utils/misc.ts index 091ca3db9..f8db1efcc 100644 --- a/server/src/utils/misc.ts +++ b/server/src/utils/misc.ts @@ -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]); }