Exemple #1
0
 def fromaccount1(accountno, amount):
     if not Dbase.hasAccountBalance(accountno, amount):
         raise Exception('Not enough balance in your account')
Exemple #2
0
 def fromaccount(accountno, amount):
     if not Dbase.hasAccountBalance(accountno, amount):
         response = make_response(
             json.dumps('Not enough balance in your account'), 400)
         response.headers['Content-Type'] = 'application/json'
         return response