mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2026-01-28 05:10:47 +03:00
add getSearchSegments endpoint
This commit is contained in:
@@ -35,6 +35,7 @@ import {postPurgeAllSegments} from "./routes/postPurgeAllSegments";
|
||||
import {getUserID} from "./routes/getUserID";
|
||||
import {getLockCategories} from "./routes/getLockCategories";
|
||||
import {getLockCategoriesByHash} from "./routes/getLockCategoriesByHash";
|
||||
import {endpoint as getSearchSegments } from "./routes/getSearchSegments";
|
||||
import ExpressPromiseRouter from "express-promise-router";
|
||||
import { Server } from "http";
|
||||
|
||||
@@ -164,6 +165,9 @@ function setupRoutes(router: Router) {
|
||||
// get privacy protecting lock categories functions
|
||||
router.get("/api/lockCategories/:prefix", getLockCategoriesByHash);
|
||||
|
||||
// get all segments that match a search
|
||||
router.get("/api/searchSegments", getSearchSegments);
|
||||
|
||||
if (config.postgres) {
|
||||
router.get("/database", (req, res) => dumpDatabase(req, res, true));
|
||||
router.get("/database.json", (req, res) => dumpDatabase(req, res, false));
|
||||
|
||||
Reference in New Issue
Block a user