Ejemplo n.º 1
0
def getUserByEmailAndPassword(uemail, password):
    result = dao.getUserByEmailAndPassword(uemail, password)
    if not result:
        return jsonify(Error="No User Found")
    mapped_result = []
    for r in result:
        mapped_result.append(DictionaryBuilder.build_credential_dict(r))
    return jsonify(Users=mapped_result)
Ejemplo n.º 2
0
def getAllCredentials():
    result = dao.getAllCredentials()
    if not result:
        return jsonify(Error="No Credentials Found")
    mapped_result = []
    for r in result:
        mapped_result.append(DictionaryBuilder.build_credential_dict(r))
    return jsonify(Credentials=mapped_result)
Ejemplo n.º 3
0
def getUserByNameAndEmail(fName, lName, uemail):
    result = dao.getUserByNameAndEmail(fName, lName, uemail)
    if not result:
        return jsonify(Error="No User Found")
    mapped_result = []
    for r in result:
        mapped_result.append(DictionaryBuilder.build_credential_dict(r))
    return jsonify(Users=mapped_result)
Ejemplo n.º 4
0
def getUserCredentials(uID):
    result = dao.getUserCredentials(uID)
    if not result:
        return jsonify(Error="No Credentials Found")
    result = DictionaryBuilder.build_credential_dict(result)
    return jsonify(UserCredentials=result)