Reload prices when ENTSO-E config has changed

This commit is contained in:
Gunnar Skjold 2022-06-04 10:07:15 +02:00
parent 3231d0747e
commit 68eaa7d39b

View File

@ -27,7 +27,10 @@ void EntsoeApi::setup(EntsoeConfig& config) {
this->config = new EntsoeConfig();
}
memcpy(this->config, &config, sizeof(config));
lastCurrencyFetch = 0;
lastTodayFetch = lastTomorrowFetch = lastCurrencyFetch = 0;
if(today != NULL) delete today;
if(tomorrow != NULL) delete tomorrow;
today = tomorrow = NULL;
}
char* EntsoeApi::getToken() {