From a0af4b48d52635e868acf2aec4e8cb2277ca2754 Mon Sep 17 00:00:00 2001 From: zkldi <20380519+zkldi@users.noreply.github.com> Date: Sun, 5 Jun 2022 14:29:31 +0100 Subject: [PATCH] refactor: rename SearchGameSongsAndCharts to SearchSpecificGameSongsAndChart --- server/src/lib/search/search.ts | 2 +- .../api/v1/users/_userID/games/_game/_playtype/pbs/router.ts | 4 ++-- .../v1/users/_userID/games/_game/_playtype/scores/router.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) 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