MCPcopy Create free account
hub / github.com/hydro-dev/Hydro / isPatchValid

Method isPatchValid

packages/hydrooj/src/settings.ts:86–94  ·  view source on GitHub ↗
(key: string, value: any)

Source from the content-addressed store, hash-verified

84 }
85
86 isPatchValid(key: string, value: any) {
87 const root = this.applyDelta(this.systemConfig, key, value);
88 try {
89 Schema.intersect(this.settings)(root);
90 } catch (e) {
91 return false;
92 }
93 return true;
94 }
95
96 async saveConfig(config: any) {
97 Schema.intersect(this.settings)(config);

Callers

nothing calls this directly

Calls 1

applyDeltaMethod · 0.95

Tested by

no test coverage detected