Skip to content

Commit dff8f7b

Browse files
committed
Send boxid to webhook
1 parent fdb08f5 commit dff8f7b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/hooks.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ var request = require('request');
44

55
var logger = require("./utils/logger")("hooks");
66

7+
var BOXID = null;
78
var HOOKS = {};
89
var POSTHOOKS = {
910
'users.auth': function(data) {
@@ -36,6 +37,7 @@ var use = function(hook, data) {
3637
// Do http requests
3738
request.post(handler, {
3839
'body': {
40+
'id': BOXID,
3941
'data': data,
4042
'hook': hook
4143
},
@@ -74,6 +76,7 @@ var use = function(hook, data) {
7476
var init = function(options) {
7577
logger.log("init hooks");
7678

79+
BOXID = options.id;
7780
HOOKS = options.hooks;
7881
SECRET_TOKEN = options.secret;
7982
};

0 commit comments

Comments
 (0)