MCPcopy Index your code
hub / github.com/parse-community/parse-server / updateCloudConfig

Function updateCloudConfig

src/GraphQL/loaders/configMutations.js:9–30  ·  view source on GitHub ↗
(context, paramName, value, isMasterKeyOnly = false)

Source from the content-addressed store, hash-verified

7const globalConfigRouter = new GlobalConfigRouter();
8
9const updateCloudConfig = async (context, paramName, value, isMasterKeyOnly = false) => {
10 const { config, auth } = context;
11
12 if (!auth.isMaster) {
13 throw createSanitizedError(
14 Parse.Error.OPERATION_FORBIDDEN,
15 'Master Key is required to update GlobalConfig.'
16 );
17 }
18
19 await globalConfigRouter.updateGlobalConfig({
20 body: {
21 params: { [paramName]: value },
22 masterKeyOnly: { [paramName]: isMasterKeyOnly },
23 },
24 config,
25 auth,
26 context,
27 });
28
29 return { value, isMasterKeyOnly };
30};
31
32const load = parseGraphQLSchema => {
33 const updateCloudConfigMutation = mutationWithClientMutationId({

Callers 1

loadFunction · 0.85

Calls 2

createSanitizedErrorFunction · 0.90
updateGlobalConfigMethod · 0.80

Tested by

no test coverage detected