Add casual mode endpoint

This commit is contained in:
Ajay
2025-02-05 03:38:55 -05:00
parent ab9cab8ff5
commit 07435b9af1
13 changed files with 409 additions and 16 deletions

View File

@@ -59,6 +59,7 @@ import { getFeatureFlag } from "./routes/getFeatureFlag";
import { getReady } from "./routes/getReady";
import { getMetrics } from "./routes/getMetrics";
import { getSegmentID } from "./routes/getSegmentID";
import { postCasual } from "./routes/postCasual";
export function createServer(callback: () => void): Server {
// Create a service (the app object is just a callback).
@@ -234,6 +235,8 @@ function setupRoutes(router: Router, server: Server) {
router.get("/api/branding/:prefix", getBrandingByHashEndpoint);
router.post("/api/branding", postBranding);
router.post("/api/casual", postCasual);
/* istanbul ignore next */
if (config.postgres?.enabled) {
router.get("/database", (req, res) => dumpDatabase(req, res, true));