mirror of
https://github.com/flarum/core.git
synced 2025-07-25 18:51:40 +02:00
Upgrade to JSON-API RC3 + latest version of tobscure/json-api
Note: npm source for ember-json-api changed to a fork, but I still had to apply a custom change to get polymorphic relationships to work (see https://github.com/kurko/ember-json-api/pull/71#issuecomment-85257281)
This commit is contained in:
@@ -47,7 +47,7 @@ class Discussion extends Model
|
||||
*
|
||||
* @var \Flarum\Core\Models\Post[]
|
||||
*/
|
||||
protected $addedPosts = [];
|
||||
public $addedPosts = [];
|
||||
|
||||
/**
|
||||
* The user for which the state relationship should be loaded.
|
||||
@@ -154,17 +154,6 @@ class Discussion extends Model
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a list of the posts that have been added to this discussion during
|
||||
* this request.
|
||||
*
|
||||
* @return \Flarum\Core\Models\Post[]
|
||||
*/
|
||||
public function getAddedPosts()
|
||||
{
|
||||
return $this->addedPosts;
|
||||
}
|
||||
|
||||
/**
|
||||
* Specify that a post was added to this discussion during this request
|
||||
* for later retrieval.
|
||||
|
Reference in New Issue
Block a user