diff --git a/server/src/utils/queries/charts.ts b/server/src/utils/queries/charts.ts index e2305b893..00b79e3ea 100644 --- a/server/src/utils/queries/charts.ts +++ b/server/src/utils/queries/charts.ts @@ -87,8 +87,10 @@ export function FindChartOnInGameID( playtype: Playtypes[Game], difficulty: Difficulties[IDStrings] ) { - // @todo #101 throw an error if this is called with a game that doesn't - // support InGameID. + if (game === "bms" || game === "usc") { + throw new Error(`Cannot call FindChartOnInGameID for game ${game}.`); + } + return db.charts[game].findOne({ "data.inGameID": inGameID, playtype, @@ -124,8 +126,6 @@ export function FindIIDXChartOnInGameIDVersion( difficulty: Difficulties[IDStrings], version: string ) { - // @todo #101 throw an error if this is called with a game that doesn't - // support InGameID. return db.charts.iidx.findOne({ "data.inGameID": inGameID, "flags.2dxtra": false, @@ -170,7 +170,7 @@ export function FindIIDXChartWith2DXtraHash(hash: string) { */ export function FindSDVXChartOnInGameID( inGameID: number, - difficulty: "NOV" | "ADV" | "EXH" | "MXM" | "ANY_INF" + difficulty: Difficulties["sdvx:Single"] | "ANY_INF" ) { const diffQuery = difficulty === "ANY_INF"