mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-10 05:27:00 +03:00
Add endpoints for config setting
This commit is contained in:
@@ -60,6 +60,8 @@ import { getReady } from "./routes/getReady";
|
||||
import { getMetrics } from "./routes/getMetrics";
|
||||
import { getSegmentID } from "./routes/getSegmentID";
|
||||
import { postCasual } from "./routes/postCasual";
|
||||
import { getConfigEndpoint } from "./routes/getConfig";
|
||||
import { setConfig } from "./routes/setConfig";
|
||||
|
||||
export function createServer(callback: () => void): Server {
|
||||
// Create a service (the app object is just a callback).
|
||||
@@ -235,6 +237,9 @@ function setupRoutes(router: Router, server: Server) {
|
||||
router.get("/api/branding/:prefix", getBrandingByHashEndpoint);
|
||||
router.post("/api/branding", postBranding);
|
||||
|
||||
router.get("/api/config", getConfigEndpoint);
|
||||
router.get("/api/config", setConfig);
|
||||
|
||||
router.post("/api/casual", postCasual);
|
||||
|
||||
/* istanbul ignore next */
|
||||
|
||||
Reference in New Issue
Block a user