Move ACCEPT constants to own "enum" class

This commit is contained in:
Philipp 2022-04-02 20:26:11 +02:00
parent c700645385
commit 73c3b21665
No known key found for this signature in database
GPG key ID: 24A7501396EB5432
35 changed files with 144 additions and 138 deletions

View file

@ -24,7 +24,7 @@ namespace Friendica\Worker;
use Friendica\Core\Logger;
use Friendica\DI;
use Friendica\Model\Contact;
use Friendica\Network\HTTPClient\Client\HttpClient;
use Friendica\Network\HTTPClient\Client\HttpClientAccept;
class PullDirectory
{
@ -48,7 +48,7 @@ class PullDirectory
Logger::info('Synchronization started.', ['now' => $now, 'directory' => $directory]);
$result = DI::httpClient()->fetch($directory . '/sync/pull/since/' . $now, 0, HttpClient::ACCEPT_JSON);
$result = DI::httpClient()->fetch($directory . '/sync/pull/since/' . $now, 0, HttpClientAccept::JSON);
if (empty($result)) {
Logger::info('Directory server return empty result.', ['directory' => $directory]);
return;