I've been playing around with koa (v1) and koa-mongo (v0.6.0) for a few hours and I tried to implement an endpoint to retrieve a document with a specific _id; however, I can't seem to find any documentation on mongo.ObjectId and if it's included in koa-mongo. Since it seems it isn't included, I've added it to the module myself by adding it to this.mongo - although I'm not sure if I could achieve it in a different way. What's the correct approach for this?
If this is useful for someone else, I can create a pull request for this.
I've been playing around with koa (v1) and koa-mongo (v0.6.0) for a few hours and I tried to implement an endpoint to retrieve a document with a specific _id; however, I can't seem to find any documentation on
mongo.ObjectId
and if it's included in koa-mongo. Since it seems it isn't included, I've added it to the module myself by adding it tothis.mongo
- although I'm not sure if I could achieve it in a different way. What's the correct approach for this?If this is useful for someone else, I can create a pull request for this.
Thanks!