Skip to content

Commit

Permalink
removed logs
Browse files Browse the repository at this point in the history
  • Loading branch information
4ty711 committed Nov 16, 2023
1 parent 637a015 commit 8521369
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 14 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ OBJY.Object({name: "Hello World"}).add(function(data)

## License

This project itself is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.
This project itself is licensed under the MIT License.
12 changes: 0 additions & 12 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,6 @@ Mapper = function(OBJY, options) {

if (app) criteria['applications'] = { $in: [app] }

console.log('using criteria', JSON.stringify(criteria, null, 4))

var finalQuery = Obj.find(criteria)

Expand All @@ -258,12 +257,9 @@ Mapper = function(OBJY, options) {
error(err);
return;
}

console.log('aggr data', data);

if(data.length){
data.forEach(d => {
console.log(match)
if(match.inherits) d.inherits = match.inherits.$in;
})
}
Expand All @@ -274,15 +270,12 @@ Mapper = function(OBJY, options) {

} else {

console.warn(criteria.$aggregate)

finalQuery.lean().exec(function(err, data) {
if (err) {
console.warn('mongo err', err)
error(err);
return;
}
console.warn('data', data);
success(data);
return;
});
Expand Down Expand Up @@ -344,15 +337,12 @@ Mapper = function(OBJY, options) {

add: function(spooElement, success, error, app, client) {

console.log('add:', spooElement);
var db = this.getDBByMultitenancy(client);

if (app) {
if (spooElement.applications.indexOf(app) == -1) spooElement.applications.push(app);
}

console.log(this.objectFamily);

var Obj = db.model(this.objectFamily, this.ObjSchema);

//delete spooElement._id;
Expand All @@ -364,7 +354,6 @@ Mapper = function(OBJY, options) {

new Obj(spooElement).save(function(err, data) {

console.log('added', err, data);
if (err) {
error(parseError(err));
return;
Expand Down Expand Up @@ -395,7 +384,6 @@ Mapper = function(OBJY, options) {
}
if (data.n == 0) error("object not found");
else {
console.log("remove success");
success(true);
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "objy-mapper-mongodb",
"version": "0.0.1",
"version": "0.0.2",
"description": "A storage mapper for mongodb",
"main": "index.js",
"repository": {
Expand Down

0 comments on commit 8521369

Please sign in to comment.