Skip to content

Commit 6b907e8

Browse files
committed
fix: organization_id
1 parent da9eeea commit 6b907e8

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/server.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ class CoCreateLazyLoader {
3434
// Call this function at the start of your application
3535
createScriptsDirectory();
3636

37-
// TODO: return the value so it can be applied directly to modules
38-
// this.modules[key] = await Config('modules', false, false)
39-
4037
this.modules = await Config('modules', false, false)
4138
if (!this.modules)
4239
return
@@ -82,7 +79,7 @@ class CoCreateLazyLoader {
8279
if (valideUrl.pathname.startsWith('/webhooks/')) {
8380
let name = req.url.split('/')[2]; // Assuming URL structure is /webhook/name/...
8481
if (this.modules[name]) {
85-
this.executeScriptWithTimeout(name, { req, res, crud: this.crud, organization, valideUrl, organization_id: data.organization })
82+
this.executeScriptWithTimeout(name, { req, res, crud: this.crud, organization, valideUrl, organization_id: organization._id })
8683
} else {
8784
// Handle unknown module or missing webhook method
8885
res.writeHead(404, { 'Content-Type': 'application/json' });

0 commit comments

Comments
 (0)