fix: remove unused endpoint

This commit is contained in:
zkldi
2022-09-09 15:08:56 +01:00
parent b02ec4cd8f
commit e6b6db16f7
2 changed files with 2 additions and 28 deletions
@@ -1,18 +1,6 @@
import t from "tap";
import mockApi from "test-utils/mock-api";
t.test("GET /api/v1/games/bms/7K/content", (t) => {
t.test("Should exist.", async (t) => {
const res = await mockApi.get("/api/v1/games/bms/7K/content");
t.equal(res.body.success, true);
t.end();
});
t.end();
});
t.test("GET /api/v1/games/bms/7K/content/sieglindeEC", (t) => {
t.test("Should point to the right file.", async (t) => {
const res = await mockApi.get("/api/v1/games/bms/7K/content/sieglindeEC/header.json");
@@ -2,9 +2,7 @@ import { Router } from "express";
import db from "external/mongo/db";
import CreateLogCtx from "lib/logger/logger";
import { CreateSongMap } from "tachi-common";
import { integer, SongDocument } from "tachi-common/types";
import { GetFolderCharts, GetFoldersFromTable } from "utils/folder";
import { GetTachiData } from "utils/req-tachi-data";
import type { Request, Response } from "express";
import type { ChartDocument } from "tachi-common/types";
@@ -12,18 +10,6 @@ const logger = CreateLogCtx(__filename);
const router: Router = Router({ mergeParams: true });
/**
* Returns "Endpoint exists"
*
* @name GET /api/v1/games/bms/7K/content
*/
router.get("/", (req, res) => {
return res.status(200).json({
success: true,
description: "Endpoint exists",
});
});
/**
* Utility function for mounting a BMS-style Table. This defines
* a header.json endpoint, and a body.json endpoint.
@@ -34,8 +20,8 @@ router.get("/", (req, res) => {
function CreateAndMountTable(
router: Router,
tableName: string,
headerHandler: (req: Request, res: Response) => any,
bodyHandler: (req: Request, res: Response) => any
headerHandler: (req: Request, res: Response) => unknown,
bodyHandler: (req: Request, res: Response) => unknown
) {
router.get(`/${tableName}`, (req, res) => {
return res.status(200).send(`<html>