Exemplo n.º 1
0
def get_faves(user_dao, request_dict):
    request_dict = request_dict or dict()

    juror_dao = JurorDAO(user_dao)
    limit = request_dict.get('limit', 10)
    offset = request_dict.get('offset', 0)
    sort = request_dict.get('sort', 'desc')
    faves = juror_dao.get_faves(sort, limit, offset)
    return {'data': [f.to_details_dict() for f in faves]}
Exemplo n.º 2
0
def get_faves(user_dao, request_dict):
    juror_dao = JurorDAO(user_dao)
    limit = request_dict.get('limit', 10)
    offset = request_dict.get('offset', 0)
    faves = juror_dao.get_faves(limit, offset)
    return {'data': faves}