1
0
Fork 0

Update ApiV1Controller, improve refresh relations logic when (un)muting or (un)blocking

This commit is contained in:
Daniel Supernault 2024-04-06 01:24:09 -06:00
parent b7322b6874
commit b8e96a5ff3
No known key found for this signature in database
GPG Key ID: 23740873EE6F76A1
1 changed files with 3 additions and 2 deletions

View File

@ -1200,8 +1200,8 @@ class ApiV1Controller extends Controller
if ($filter) {
$filter->delete();
UserFilterService::unblock($pid, $profile->id);
RelationshipService::refresh($pid, $id);
}
RelationshipService::refresh($pid, $id);
$resource = new Fractal\Resource\Item($profile, new RelationshipTransformer());
$res = $this->fractal->createData($resource)->toArray();
@ -2207,9 +2207,10 @@ class ApiV1Controller extends Controller
if ($filter) {
$filter->delete();
UserFilterService::unmute($pid, $profile->id);
RelationshipService::refresh($pid, $id);
}
RelationshipService::refresh($pid, $id);
$resource = new Fractal\Resource\Item($profile, new RelationshipTransformer());
$res = $this->fractal->createData($resource)->toArray();