def getAllTransactions(self): dao = TransactionDAO() transaction_list = dao.getAllTransactions() result_list = [] for row in transaction_list: result = self.build_transaction_dict(row) result_list.append(result) return jsonify(Transactions=result_list)
def getAllTransactions(self): dao = TransactionDAO() transaction_list = dao.getAllTransactions() if not transaction_list: return jsonify(Error="Transaction Not Found"), 404 else: result_list = [] for row in transaction_list: result = self.build_transaction_dict(row) result_list.append(result) return jsonify(Transactions=result_list)