(req)
| 73 | } |
| 74 | |
| 75 | handleUpdate(req) { |
| 76 | var hook; |
| 77 | if (req.params.functionName && req.body?.url) { |
| 78 | hook = {}; |
| 79 | hook.functionName = req.params.functionName; |
| 80 | hook.url = req.body.url; |
| 81 | } else if (req.params.className && req.params.triggerName && req.body?.url) { |
| 82 | hook = {}; |
| 83 | hook.className = req.params.className; |
| 84 | hook.triggerName = req.params.triggerName; |
| 85 | hook.url = req.body.url; |
| 86 | } else { |
| 87 | throw new Parse.Error(143, 'invalid hook declaration'); |
| 88 | } |
| 89 | return this.updateHook(hook, req.config); |
| 90 | } |
| 91 | |
| 92 | handlePut(req) { |
| 93 | if (req.auth.isReadOnly) { |
no test coverage detected