From 91b16f3d5f78517d1422cb1991e988f9104c2900 Mon Sep 17 00:00:00 2001 From: zk Date: Tue, 17 Dec 2024 15:16:47 +0000 Subject: [PATCH] fix: enforce ddrSongHash is only used on DDR --- .../import-types/common/batch-manual/converter.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/src/lib/score-import/import-types/common/batch-manual/converter.ts b/server/src/lib/score-import/import-types/common/batch-manual/converter.ts index 7d39f7c51..b47706543 100644 --- a/server/src/lib/score-import/import-types/common/batch-manual/converter.ts +++ b/server/src/lib/score-import/import-types/common/batch-manual/converter.ts @@ -433,6 +433,10 @@ export async function ResolveMatchTypeToTachiData( } case "ddrSongHash": { + if (game !== "ddr") { + throw new InvalidScoreFailure(`ddrSongHash matchType can only be used on DDR.`); + } + const difficulty = AssertStrAsDifficulty(data.difficulty, game, context.playtype); const song = await db.anySongs.ddr.findOne({