drapi 1.8.49 → 1.8.50

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/lib/models.js CHANGED
@@ -27,7 +27,7 @@ let connectionschema = {};
27
27
 
28
28
  let getConnection = function(dbname){
29
29
  connectionschema[dbname] = connectionschema[dbname] || {};
30
- let connection = db.getDatabaseConnection(dbname);
30
+ let connection = db.getDatabaseConnection(dbname);
31
31
  return connection;
32
32
  }
33
33
 
@@ -49,7 +49,6 @@ let models = {
49
49
  */
50
50
  getModelSchemaInstance: function(dbname, model, schema){
51
51
  let connection = getConnection(dbname);
52
- console.log("tamaño de la connection db antes de instancia model: ", dbname, model, sizeof(connection));
53
52
 
54
53
  //Verify if the schema is allready initialized or if its atributos have changed
55
54
  if(!connectionschema[dbname][model] || hasStructureChanged(connectionschema[dbname][model].obj, schema.attributes)){
@@ -68,9 +67,8 @@ let models = {
68
67
  connectionschema[dbname][model] = modelSchema;
69
68
  console.log("tamaño de schemas almacenados en memoria: ", sizeof(connectionschema));
70
69
  }
71
- let Model = connection.model(model, connectionschema[dbname][model]);
72
- console.log("tamaño de la connection db despues de instancia model: ", dbname, model, sizeof(connection));
73
- return Model;
70
+
71
+ return connection.model(model, connectionschema[dbname][model]);
74
72
  },
75
73
  /**
76
74
  * Function incharge of initializing and returning dynamicaly a mongoose model
package/lib/router.js CHANGED
@@ -24,6 +24,5 @@ module.exports = function (pathToControllers, prefix, router){
24
24
  router.use(prefix, controller.router.routes(), controller.router.allowedMethods());
25
25
  }
26
26
  });
27
- console.log("Tamaño de router ", sizeof(router));``
28
27
  return router;
29
28
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drapi",
3
- "version": "1.8.49",
3
+ "version": "1.8.50",
4
4
  "description": "Dynamic rest api using mongoDb",
5
5
  "main": "index.js",
6
6
  "scripts": {