mirror of
https://github.com/zkldi/Tachi.git
synced 2026-09-30 10:58:07 +03:00
fix: remove unused endpoint
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user