Beispiel #1
0
def get_paginated_users(
        dao: Dao = Depends(get_dao), skip: int = 0, limit: int = 10,
        q: str = None):
    user_list = dao.get_users(skip, limit, q)
    for user in user_list['result']:
        user.id = str(uuid.UUID(bytes=user.id))

    return user_list
Beispiel #2
0
def get_users(dao: Dao = Depends(get_dao), q: str = None):
    user_list = dao.get_users(0, -1, q)
    for user in user_list:
        user.id = str(uuid.UUID(bytes=user.id))

    return user_list