Exemple #1
0
 def get_all(self):
     return [User.from_dict(x) for x in super().get_all()]
Exemple #2
0
 def get(self, user_id):
     return User.from_dict(self.collection.find_one({"_id": user_id}))
Exemple #3
0
 def get_one_by_query(self, query):
     result = self.collection.find_one(query)
     return User.from_dict(result) if result else None