示例#1
0
def getUserActivity(user_id):
    result = dao.getUserActivity(user_id)
    if not result:
        return jsonify(Error="No Activity Found"), 404
    mapped_result = []
    for row in result:
        mapped_result.append(Dict.activity_dict(row))
    return jsonify(UserActivity=result)
示例#2
0
def getAllActivity():
    result = dao.getAllActivity()
    if not result:
        return jsonify(Error="No Activity Found"), 404
    mapped_result = []
    for row in result:
        mapped_result.append(Dict.activity_dict(row))
    return jsonify(Activity=mapped_result)