mirror of
https://github.com/flarum/core.git
synced 2025-10-13 07:54:25 +02:00
Get rid of JsonApiResponse class
With the JSON-API library being updated, we can just make use of Diactoros' JSON response class.
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
<?php namespace Flarum\Api;
|
||||
|
||||
use Tobscure\JsonApi\Document;
|
||||
use Zend\Diactoros\Response;
|
||||
|
||||
class JsonApiResponse extends Response
|
||||
{
|
||||
public function __construct(Document $document)
|
||||
{
|
||||
parent::__construct('php://memory', 200, ['content-type' => 'application/vnd.api+json']);
|
||||
|
||||
$this->getBody()->write($document);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user