MCPcopy
hub / github.com/parse-community/parse-server / loadKeys

Method loadKeys

src/Config.js:70–91  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

68 }
69
70 async loadKeys() {
71 await Promise.all(
72 asyncKeys.map(async key => {
73 if (typeof this[`_${key}`] === 'function') {
74 try {
75 this[key] = await this[`_${key}`]();
76 } catch (error) {
77 throw new Error(`Failed to resolve async config key '${key}': ${error.message}`);
78 }
79 }
80 })
81 );
82
83 const cachedConfig = AppCache.get(this.appId);
84 if (cachedConfig) {
85 const updatedConfig = { ...cachedConfig };
86 asyncKeys.forEach(key => {
87 updatedConfig[key] = this[key];
88 });
89 AppCache.put(this.appId, updatedConfig);
90 }
91 }
92
93 static transformConfiguration(serverConfiguration) {
94 for (const key of Object.keys(serverConfiguration)) {

Callers 3

handleParseHeadersFunction · 0.80
handleParseAuthFunction · 0.80
setConfigMethod · 0.80

Calls 2

getMethod · 0.45
putMethod · 0.45

Tested by

no test coverage detected