MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / writeConfig

Function writeConfig

speedtest/speedtest.ts:197–206  ·  view source on GitHub ↗
(patch: Partial<SpeedtestConfig>)

Source from the content-addressed store, hash-verified

195 fs.writeFileSync(SPEEDTEST_JSON, JSON.stringify(next));
196 } catch (error: any) {
197 console.error("Failed to write config:", error);
198 }
199}
200
201function getDefaultServer(): number | null {
202 const cfg = readConfig();
203 return cfg.default_server_id ?? null;
204}
205
206function saveDefaultServer(serverId: number | null): void {
207 writeConfig({ default_server_id: serverId });
208}
209

Callers 2

saveDefaultServerFunction · 0.85
savePreferredTypeFunction · 0.85

Calls 3

readConfigFunction · 0.85
errorMethod · 0.80
ensureDirectoriesFunction · 0.70

Tested by

no test coverage detected