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.

refactor(demo): the addon states type names its shelves inline

Maurice2df677d065aa
diff --git a/server/src/db/repositories/DemoRepository.ts b/server/src/db/repositories/DemoRepository.ts
index ac6a4565b..0a0a4a9db 100644
--- a/server/src/db/repositories/DemoRepository.ts
+++ b/server/src/db/repositories/DemoRepository.ts
@@ -40,17 +40,12 @@ export interface DemoInstanceKeyRow {
value: string | null;
}
-/** One shelf of the demo addon policy (`demo/demo-addon-policy.ts`): the rows it switches on and off. */
-export interface DemoShelfStates {
- readonly on: readonly string[];
- readonly off: readonly string[];
-}
-
/** The states `applyAddonStates` writes: three shelves and the switches under them in `app_settings`. */
export interface DemoAddonStates {
- readonly addons: DemoShelfStates;
- readonly photoProviders: DemoShelfStates;
- readonly documentProviders: DemoShelfStates;
+ /** Each shelf names the rows it switches on and the rows it switches off. */
+ readonly addons: { readonly on: readonly string[]; readonly off: readonly string[] };
+ readonly photoProviders: { readonly on: readonly string[]; readonly off: readonly string[] };
+ readonly documentProviders: { readonly on: readonly string[]; readonly off: readonly string[] };
readonly appSettings: Readonly<Record<string, string>>;
}