Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

544 B
Raw Blame
/**
 * API-docs kill switch (#1412). Deliberately NOT in src/config.ts: that module
 * is frozen at import (and replaced wholesale under test), and reading the env
 * at call time keeps the flag testable per-request (same pattern as plugins/kill-switch.ts).
 *
 * Off by default — the generated spec enumerates every route including the
 * admin surface, so exposing it is an explicit self-hoster decision.
 */
import { readEnv } from '../../app-config';

export function apiDocsEnabled(): boolean {
  return readEnv().http.apiDocsEnabled;
}