chore: clean up layout and code

This commit is contained in:
rtdany10
2021-09-04 14:04:56 +05:30
parent a86d9c91d0
commit 227466c365
8 changed files with 29 additions and 89 deletions

View File

@@ -108,9 +108,7 @@ def get_exchange_rate(from_currency, to_currency, transaction_date=None, args=No
}
params = {}
for row in settings.req_params:
params[row.key] = req_params[row.value]
for eparam in settings.extra_params:
params[eparam.key] = format_ces_api(eparam.value, req_params)
params[row.key] = format_ces_api(row.value, req_params)
response = requests.get(format_ces_api(settings.api_endpoint, req_params), params=params)
# expire in 6 hours
response.raise_for_status()