mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-08 12:37:00 +03:00
Add youtube api cache
This commit is contained in:
@@ -39,6 +39,7 @@ import {endpoint as getSearchSegments } from "./routes/getSearchSegments";
|
||||
import {getStatus } from "./routes/getStatus";
|
||||
import ExpressPromiseRouter from "express-promise-router";
|
||||
import { Server } from "http";
|
||||
import { youtubeApiProxy } from "./routes/youtubeApiProxy";
|
||||
|
||||
export function createServer(callback: () => void): Server {
|
||||
// Create a service (the app object is just a callback).
|
||||
@@ -173,6 +174,8 @@ function setupRoutes(router: Router) {
|
||||
router.get("/api/status/:value", getStatus);
|
||||
router.get("/api/status", getStatus);
|
||||
|
||||
router.get("/api/youtubeApiProxy", youtubeApiProxy);
|
||||
|
||||
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