Esempio n. 1
0
 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)
Esempio n. 2
0
 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)