@cocreate/lazy-loader 1.11.2 → 1.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/server.js +1 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [1.11.3](https://github.com/CoCreate-app/CoCreate-lazy-loader/compare/v1.11.2...v1.11.3) (2023-12-09)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* organization_id ([6b907e8](https://github.com/CoCreate-app/CoCreate-lazy-loader/commit/6b907e86bd64eb6c45abd592f698a615a032b7e7))
|
|
7
|
+
|
|
1
8
|
## [1.11.2](https://github.com/CoCreate-app/CoCreate-lazy-loader/compare/v1.11.1...v1.11.2) (2023-12-09)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
package/src/server.js
CHANGED
|
@@ -34,9 +34,6 @@ class CoCreateLazyLoader {
|
|
|
34
34
|
// Call this function at the start of your application
|
|
35
35
|
createScriptsDirectory();
|
|
36
36
|
|
|
37
|
-
// TODO: return the value so it can be applied directly to modules
|
|
38
|
-
// this.modules[key] = await Config('modules', false, false)
|
|
39
|
-
|
|
40
37
|
this.modules = await Config('modules', false, false)
|
|
41
38
|
if (!this.modules)
|
|
42
39
|
return
|
|
@@ -82,7 +79,7 @@ class CoCreateLazyLoader {
|
|
|
82
79
|
if (valideUrl.pathname.startsWith('/webhooks/')) {
|
|
83
80
|
let name = req.url.split('/')[2]; // Assuming URL structure is /webhook/name/...
|
|
84
81
|
if (this.modules[name]) {
|
|
85
|
-
this.executeScriptWithTimeout(name, { req, res, crud: this.crud, organization, valideUrl, organization_id:
|
|
82
|
+
this.executeScriptWithTimeout(name, { req, res, crud: this.crud, organization, valideUrl, organization_id: organization._id })
|
|
86
83
|
} else {
|
|
87
84
|
// Handle unknown module or missing webhook method
|
|
88
85
|
res.writeHead(404, { 'Content-Type': 'application/json' });
|