mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-26 00:03:16 +00:00
Update ApiV1Controller, improve refresh relations logic when (un)muting or (un)blocking
This commit is contained in:
parent
b7322b6874
commit
b8e96a5ff3
1 changed files with 3 additions and 2 deletions
|
@ -1200,8 +1200,8 @@ class ApiV1Controller extends Controller
|
||||||
if ($filter) {
|
if ($filter) {
|
||||||
$filter->delete();
|
$filter->delete();
|
||||||
UserFilterService::unblock($pid, $profile->id);
|
UserFilterService::unblock($pid, $profile->id);
|
||||||
RelationshipService::refresh($pid, $id);
|
|
||||||
}
|
}
|
||||||
|
RelationshipService::refresh($pid, $id);
|
||||||
|
|
||||||
$resource = new Fractal\Resource\Item($profile, new RelationshipTransformer());
|
$resource = new Fractal\Resource\Item($profile, new RelationshipTransformer());
|
||||||
$res = $this->fractal->createData($resource)->toArray();
|
$res = $this->fractal->createData($resource)->toArray();
|
||||||
|
@ -2207,9 +2207,10 @@ class ApiV1Controller extends Controller
|
||||||
if ($filter) {
|
if ($filter) {
|
||||||
$filter->delete();
|
$filter->delete();
|
||||||
UserFilterService::unmute($pid, $profile->id);
|
UserFilterService::unmute($pid, $profile->id);
|
||||||
RelationshipService::refresh($pid, $id);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RelationshipService::refresh($pid, $id);
|
||||||
|
|
||||||
$resource = new Fractal\Resource\Item($profile, new RelationshipTransformer());
|
$resource = new Fractal\Resource\Item($profile, new RelationshipTransformer());
|
||||||
$res = $this->fractal->createData($resource)->toArray();
|
$res = $this->fractal->createData($resource)->toArray();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue