Example #1
0
def sortPeopleByAge():
    '''
    Returns Json block containing a list of people sorted by age youngest to oldest
    '''
    # TODO
    con_cur = Database.get_connection()
    result = jsonify(People.get_all_users(con_cur, order_by='age'))
    con_cur.close()
    return result
Example #2
0
def getPeople():
    '''
    Return a standard JSON block of people in any order of format. Must be valid JSON
    '''
    # TODO
    con_cur = Database.get_connection()
    result = jsonify(People.get_all_users(con_cur))
    con_cur.close()
    return result