Replace IRespondToRequests with PSR-7 ResponseInterface

This commit is contained in:
Philipp 2021-11-21 23:37:17 +01:00
parent ca5c40c97e
commit 7cd85873ee
No known key found for this signature in database
GPG key ID: 24A7501396EB5432
17 changed files with 96 additions and 92 deletions

View file

@ -23,11 +23,10 @@ namespace Friendica\Module;
use Friendica\App;
use Friendica\BaseModule;
use Friendica\Capabilities\IRespondToRequests;
use Friendica\Capabilities\ICanCreateResponses;
use Friendica\Core\Addon;
use Friendica\Core\Config\Capability\IManageConfigValues;
use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Model\Nodeinfo;
use Friendica\Util\Profiler;
use Psr\Log\LoggerInterface;
@ -89,7 +88,7 @@ class NodeInfo210 extends BaseModule
$nodeinfo['services']['inbound'][] = 'imap';
}
$this->response->setType(IRespondToRequests::TYPE_JSON, 'application/json; charset=utf-8');
$this->response->setType(ICanCreateResponses::TYPE_JSON, 'application/json; charset=utf-8');
$this->response->addContent(json_encode($nodeinfo, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES));
}
}