patch(server): stub out targets/rivals

This commit is contained in:
zkldi
2022-08-17 23:38:55 +01:00
parent 2cf495c6d1
commit 36de183a5a
2 changed files with 15 additions and 3 deletions
@@ -9,6 +9,7 @@ import { Router } from "express";
import db from "external/mongo/db";
import { ONE_HOUR } from "lib/constants/time";
import { SearchUsersRegExp } from "lib/search/search";
import { Environment } from "lib/setup/config";
import NodeCache from "node-cache";
import p from "prudence";
import prValidate from "server/middleware/prudence-validate";
@@ -340,6 +341,10 @@ router.use("/songs/:songID", songIDRouter);
router.use("/folders", foldersRouter);
router.use("/tables", tablesRouter);
router.use("/scores", scoresRouter);
router.use("/targets", targetsRouter);
// stubbed for tests only, not ready for release.
if (Environment.nodeEnv === "test") {
router.use("/targets", targetsRouter);
}
export default router;
@@ -10,6 +10,7 @@ import tablesRouter from "./tables/router";
import targetsRouter from "./targets/router";
import { Router } from "express";
import db from "external/mongo/db";
import { Environment } from "lib/setup/config";
import { GetGamePTConfig } from "tachi-common";
import { IsString } from "utils/misc";
import { GetTachiData, GetUGPT } from "utils/req-tachi-data";
@@ -298,7 +299,13 @@ router.use("/tables", tablesRouter);
router.use("/showcase", showcaseRouter);
router.use("/settings", settingsRouter);
router.use("/folders", foldersRouter);
router.use("/targets", targetsRouter);
router.use("/rivals", rivalsRouter);
// these are stubbed out in release, as they aren't ready for full release yet
// but we desperately need a 2.1 update.
// they are, however, available in tests because otherwise tests would fail.
if (Environment.nodeEnv === "test") {
router.use("/targets", targetsRouter);
router.use("/rivals", rivalsRouter);
}
export default router;