Esempio n. 1
0
 def put_account(cl_id, account_id):
     account = Account.json_parse_account(request.json)
     account.account_id = int(account_id)
     try:
         AccountService.update_account(account)
         return jsonify(account.json()), 200
     except ValueError:
         print("Not Found")
Esempio n. 2
0
 def post_account(cl_id):
     account = Account.json_parse_account(request.json)
     account.cl_id = int(cl_id)
     account = AccountService.create_account(account)
     return jsonify(account.json()), 201