Skip to content

Commit

Permalink
fix: enforce ddrSongHash is only used on DDR
Browse files Browse the repository at this point in the history
  • Loading branch information
zkrising committed Dec 17, 2024
1 parent 9e48cd6 commit 91b16f3
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit 91b16f3

Please sign in to comment.