We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 30c52d3 commit 6fb9266Copy full SHA for 6fb9266
plugins/hooks/api/api.js
@@ -305,11 +305,15 @@ plugins.register("/i/hook/save", function(ob) {
305
function(err, result) {
306
if (!err) {
307
// Audit log: Hook updated
308
- plugins.dispatch("/systemlogs", {
309
- params: params,
310
- action: "hook_updated",
311
- data: { updated: result.value }
312
- });
+ if(result && result.value) {
+ plugins.dispatch("/systemlogs", {
+ params: params,
+ action: "hook_updated",
+ data: { updated: result.value }
313
+ });
314
+ } else {
315
+ common.returnMessage(params, 500, "No result found");
316
+ }
317
common.returnOutput(params, result && result.value);
318
}
319
else {
0 commit comments