mirror of
https://github.com/flarum/core.git
synced 2025-08-03 15:07:53 +02:00
Update serializer API
This commit is contained in:
@@ -34,18 +34,18 @@ class FlagSerializer extends AbstractSerializer
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return \Flarum\Api\Relationship\HasOneBuilder
|
* @return \Tobscure\JsonApi\Relationship
|
||||||
*/
|
*/
|
||||||
protected function post()
|
protected function post($flag)
|
||||||
{
|
{
|
||||||
return $this->hasOne(PostSerializer::class);
|
return $this->hasOne($flag, PostSerializer::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return \Flarum\Api\Relationship\HasOneBuilder
|
* @return \Tobscure\JsonApi\Relationship
|
||||||
*/
|
*/
|
||||||
protected function user()
|
protected function user($flag)
|
||||||
{
|
{
|
||||||
return $this->hasOne(UserBasicSerializer::class);
|
return $this->hasOne($flag, UserBasicSerializer::class);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user