Beispiel #1
0
 def list(cls, page=0, limit=10) -> List[User]:
     offset = page * limit
     accounts = User.objects().filter().limit(limit).skip(offset)
     return list(accounts)
Beispiel #2
0
 def get_by_email(cls, email: str):
     user = User.objects().filter(email=email).first()
     return user
Beispiel #3
0
 def get_by_username(cls, username: str):
     user = User.objects().filter(username=username).first()
     return user
Beispiel #4
0
 def get_by_id(cls, uid: str):
     user = User.objects().filter(id=uid).first()
     return user