diff --git a/server/src/lib/search/search.ts b/server/src/lib/search/search.ts index 3d8150b95..2bda2b78e 100644 --- a/server/src/lib/search/search.ts +++ b/server/src/lib/search/search.ts @@ -78,7 +78,7 @@ export function SearchSpecificGameSongs( return SearchCollection(db.songs[game], search, {}, limit); } -export async function SearchGameSongsAndCharts( +export async function SearchSpecificGameSongsAndCharts( game: Game, search: string, playtype?: Playtype, diff --git a/server/src/server/router/api/v1/users/_userID/games/_game/_playtype/pbs/router.ts b/server/src/server/router/api/v1/users/_userID/games/_game/_playtype/pbs/router.ts index e702f1a6a..71166b327 100644 --- a/server/src/server/router/api/v1/users/_userID/games/_game/_playtype/pbs/router.ts +++ b/server/src/server/router/api/v1/users/_userID/games/_game/_playtype/pbs/router.ts @@ -1,6 +1,6 @@ import { Router } from "express"; import db from "external/mongo/db"; -import { SearchGameSongsAndCharts } from "lib/search/search"; +import { SearchSpecificGameSongsAndCharts } from "lib/search/search"; import { AggressiveRateLimitMiddleware } from "server/middleware/rate-limiter"; import { GetGamePTConfig } from "tachi-common"; import { GetRelevantSongsAndCharts } from "utils/db"; @@ -29,7 +29,7 @@ router.get("/", async (req, res) => { }); } - const { songs: allSongs, charts: allCharts } = await SearchGameSongsAndCharts( + const { songs: allSongs, charts: allCharts } = await SearchSpecificGameSongsAndCharts( game, req.query.search, playtype diff --git a/server/src/server/router/api/v1/users/_userID/games/_game/_playtype/scores/router.ts b/server/src/server/router/api/v1/users/_userID/games/_game/_playtype/scores/router.ts index 815252944..78100a5fa 100644 --- a/server/src/server/router/api/v1/users/_userID/games/_game/_playtype/scores/router.ts +++ b/server/src/server/router/api/v1/users/_userID/games/_game/_playtype/scores/router.ts @@ -1,6 +1,6 @@ import { Router } from "express"; import db from "external/mongo/db"; -import { SearchGameSongsAndCharts } from "lib/search/search"; +import { SearchSpecificGameSongsAndCharts } from "lib/search/search"; import { HyperAggressiveRateLimitMiddleware } from "server/middleware/rate-limiter"; import { GetRelevantSongsAndCharts } from "utils/db"; import { GetUGPT } from "utils/req-tachi-data"; @@ -23,7 +23,7 @@ router.get("/", async (req, res) => { }); } - const { songs: allSongs, charts: allCharts } = await SearchGameSongsAndCharts( + const { songs: allSongs, charts: allCharts } = await SearchSpecificGameSongsAndCharts( game, req.query.search, playtype