add tests

This commit is contained in:
Michael C
2021-09-18 23:24:23 -04:00
parent 0fc39cf5f2
commit c0074c9f8c
3 changed files with 123 additions and 1 deletions

View File

@@ -37,6 +37,7 @@ import {getLockCategories} from "./routes/getLockCategories";
import {getLockCategoriesByHash} from "./routes/getLockCategoriesByHash";
import {endpoint as getSearchSegments } from "./routes/getSearchSegments";
import {getStatus } from "./routes/getStatus";
import { getLockReason } from "./routes/getLockReason";
import ExpressPromiseRouter from "express-promise-router";
import { Server } from "http";
import { youtubeApiProxy } from "./routes/youtubeApiProxy";
@@ -176,6 +177,8 @@ function setupRoutes(router: Router) {
router.get("/api/youtubeApiProxy", youtubeApiProxy);
router.get("/api/lockReason", getLockReason);
if (config.postgres) {
router.get("/database", (req, res) => dumpDatabase(req, res, true));
router.get("/database.json", (req, res) => dumpDatabase(req, res, false));