You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
asyncfindByName(name){constrepository=awaitQ.Models.User.repositoryconstcollection=repository.adapter.client.collection('users')returncollection.find({ name }).toArray()}
The text was updated successfully, but these errors were encountered:
Because what I need, is mongo collection, I just injected mongo into my class, something like this.
module.exports = class {
constructor(mongo) {
this.mongo = mongo
}
async userCollection() {
return this.mongo.collection('user')
}
}```
I think this is more clear, better than through Q.Models
The text was updated successfully, but these errors were encountered: