mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-13 12:04:09 +02:00
refactor: logger (#3678)
This commit is contained in:
@@ -113,15 +113,14 @@ class ElloBridge extends BridgeAbstract
|
||||
|
||||
private function getAPIKey()
|
||||
{
|
||||
$cache = RssBridge::getCache();
|
||||
$cacheKey = 'ElloBridge_key';
|
||||
$apiKey = $cache->get($cacheKey);
|
||||
$apiKey = $this->cache->get($cacheKey);
|
||||
|
||||
if (!$apiKey) {
|
||||
$keyInfo = getContents(self::URI . 'api/webapp-token') or returnServerError('Unable to get token.');
|
||||
$apiKey = json_decode($keyInfo)->token->access_token;
|
||||
$ttl = 60 * 60 * 20;
|
||||
$cache->set($cacheKey, $apiKey, $ttl);
|
||||
$this->cache->set($cacheKey, $apiKey, $ttl);
|
||||
}
|
||||
|
||||
return $apiKey;
|
||||
|
Reference in New Issue
Block a user