mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-11 05:57:04 +03:00
Add feature flag endpoint
This commit is contained in:
13
src/routes/getFeatureFlag.ts
Normal file
13
src/routes/getFeatureFlag.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { config } from "../config";
|
||||
import { Request, Response } from "express";
|
||||
|
||||
export function getFeatureFlag(req: Request, res: Response): Response {
|
||||
const { params: { name } } = req;
|
||||
|
||||
switch (name) {
|
||||
case "deArrowPaywall":
|
||||
return res.status(200).json({
|
||||
enabled: config.deArrowPaywall,
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user