Skip to content

Commit

Permalink
Filter mongodb id value when querying the database #535
Browse files Browse the repository at this point in the history
  • Loading branch information
GopiGugan committed Sep 16, 2024
1 parent c7d0d20 commit af038b2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion dbmanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class DBManager {
}

get_regionMap() {
return this.db_.collection($COLLECTION__REGION_MAP).find().toArray().then((docs,err)=>{
return this.db_.collection($COLLECTION__REGION_MAP).find({}, { projection: { _id: 0 } }).toArray().then((docs,err)=>{
if(err){
console.log(`dbmanager::get_regionMap error`,err);
return ;
Expand Down
1 change: 0 additions & 1 deletion js/covizu.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,6 @@ req = $.when(
}),
$.getJSON("/api/regionmap", function(data) {
region_map = data;
delete region_map._id;
})
);

Expand Down

0 comments on commit af038b2

Please sign in to comment.