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