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

Method saveConfig

packages/hydrooj/src/settings.ts:96–101  ·  view source on GitHub ↗
(config: any)

Source from the content-addressed store, hash-verified

94 }
95
96 async saveConfig(config: any) {
97 Schema.intersect(this.settings)(config);
98 const value = yaml.dump(config);
99 await this.ctx.db.collection('system').updateOne({ _id: 'config' }, { $set: { value } }, { upsert: true });
100 await this.loadConfig();
101 }
102
103 async _actualMigrate(schema: Schema<any>) {
104 const processNode = async (path: string[], node: Schema<any, any>) => {

Callers 3

processNodeMethod · 0.95
setConfigMethod · 0.95
postMethod · 0.80

Calls 2

loadConfigMethod · 0.95
collectionMethod · 0.80

Tested by

no test coverage detected