Skip to content

Commit

Permalink
turned objectids to string
Browse files Browse the repository at this point in the history
  • Loading branch information
4ty711 committed Jun 14, 2024
1 parent 9cef42b commit 4ae9ce3
Show file tree
Hide file tree
Showing 3 changed files with 8,462 additions and 1 deletion.
15 changes: 15 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ Mapper = function (OBJY, options) {
return;
}

data._id = String(data._id);

success(data);
return;
});
Expand Down Expand Up @@ -252,6 +254,9 @@ Mapper = function (OBJY, options) {

if (data.length) {
data.forEach((d) => {

d._id = String(d._id);

if (match.inherits) d.inherits = match.inherits.$in;
});
}
Expand All @@ -266,6 +271,11 @@ Mapper = function (OBJY, options) {
error(err);
return;
}

data.forEach((d) => {
d._id = String(d._id);
});

success(data);
return;
});
Expand Down Expand Up @@ -313,6 +323,9 @@ Mapper = function (OBJY, options) {
error(err);
return;
}

spooElement._id = String(spooElement._id);

if (data.n != 0) success(spooElement);
else error('object not found');
});
Expand All @@ -339,6 +352,8 @@ Mapper = function (OBJY, options) {
return;
}

data._id = String(data._id);

success(data);
});
},
Expand Down
Loading

0 comments on commit 4ae9ce3

Please sign in to comment.