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

Method updateHook

src/Controllers/HooksController.js:167–184  ·  view source on GitHub ↗
(aHook)

Source from the content-addressed store, hash-verified

165 }
166
167 updateHook(aHook) {
168 if (aHook.functionName) {
169 return this.getFunction(aHook.functionName).then(result => {
170 if (result) {
171 return this.createOrUpdateHook(aHook);
172 }
173 throw new Parse.Error(143, `no function named: ${aHook.functionName} is defined`);
174 });
175 } else if (aHook.className && aHook.triggerName) {
176 return this.getTrigger(aHook.className, aHook.triggerName).then(result => {
177 if (result) {
178 return this.createOrUpdateHook(aHook);
179 }
180 throw new Parse.Error(143, `class ${aHook.className} does not exist`);
181 });
182 }
183 throw new Parse.Error(143, 'invalid hook declaration');
184 }
185}
186
187function wrapToHTTPRequest(hook, key) {

Callers

nothing calls this directly

Calls 3

getFunctionMethod · 0.95
createOrUpdateHookMethod · 0.95
getTriggerMethod · 0.95

Tested by

no test coverage detected