@cocreate/crud-server
Advanced tools
Comparing version
@@ -0,1 +1,8 @@ | ||
## [1.19.1](https://github.com/CoCreate-app/CoCreate-crud-server/compare/v1.19.0...v1.19.1) (2023-04-11) | ||
### Bug Fixes | ||
* pass dbUrl to constructor ([7900c05](https://github.com/CoCreate-app/CoCreate-crud-server/commit/7900c0539998cb5f42cd27aed3844d0d43f5370b)) | ||
# [1.19.0](https://github.com/CoCreate-app/CoCreate-crud-server/compare/v1.18.0...v1.19.0) (2023-04-11) | ||
@@ -2,0 +9,0 @@ |
{ | ||
"name": "@cocreate/crud-server", | ||
"version": "1.19.0", | ||
"version": "1.19.1", | ||
"description": "CoCreate-crud-server", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -6,5 +6,6 @@ 'use strict'; | ||
class CoCreateCrudServer { | ||
constructor(wsManager, databases) { | ||
constructor(wsManager, databases, dbUrl) { | ||
this.wsManager = wsManager | ||
this.databases = databases | ||
this.dbUrl = dbUrl | ||
this.ObjectId = ObjectId | ||
@@ -109,3 +110,3 @@ this.databaseUrls = new Map(); | ||
if (data.organization_id === process.env.organization_id) { | ||
dbUrl = {mongodb: [process.env.MONGO_URL]} | ||
dbUrl = this.dbUrl | ||
console.log('platform dbUrl crud', dbUrl) | ||
@@ -167,3 +168,3 @@ this.databaseUrls.set(data.organization_id, dbUrl) | ||
let platformUpdate = { | ||
dbUrl: process.env.MONGO_URL, | ||
dbUrl: dbUrl[data.db[i]][0], | ||
database: process.env.organization_id, | ||
@@ -170,0 +171,0 @@ collection: data.collection, |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
92772
0.29%365
0.27%5
-28.57%