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)
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)
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)
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)