Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exchange rates api #148

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

Leonigas
Copy link
Contributor

@Leonigas Leonigas commented Jul 6, 2021

Exchange API rate now need an API key

@@ -65,8 +65,14 @@ public function handle()
$defaultCurrency = $this->currency->config('default');

if ($this->input->getOption('exchangeratesapi')) {
if (!$api = $this->currency->config('api_key')) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a little messy. Please clean it up some to look more like this:

if ($access_key = $this->currency->config('api_key')) {
    return $this->updateFromExchangeRatesApi($defaultCurrency, $access_key);
}

$this->error('An API key is needed from exchangeratesapi.io to continue.');

return;

Also please make the variable more description, $api doesn't make any sense for the access_key, even api_key would be better.

@Leonigas
Copy link
Contributor Author

Done

@dcyou dcyou mentioned this pull request Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants