mirror of https://github.com/pixelfed/pixelfed.git
Fix v1 api block/mute endpoints, refresh RelationshipService cache after relationship changes
This commit is contained in:
parent
bec9c292b6
commit
54a5c3be34
|
@ -916,6 +916,7 @@ class ApiV1Controller extends Controller
|
||||||
|
|
||||||
Cache::forget("user:filter:list:$pid");
|
Cache::forget("user:filter:list:$pid");
|
||||||
Cache::forget("api:local:exp:rec:$pid");
|
Cache::forget("api:local:exp:rec:$pid");
|
||||||
|
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();
|
||||||
|
@ -951,6 +952,7 @@ class ApiV1Controller extends Controller
|
||||||
|
|
||||||
Cache::forget("user:filter:list:$pid");
|
Cache::forget("user:filter:list:$pid");
|
||||||
Cache::forget("api:local:exp:rec:$pid");
|
Cache::forget("api:local:exp:rec:$pid");
|
||||||
|
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();
|
||||||
|
@ -1736,6 +1738,7 @@ class ApiV1Controller extends Controller
|
||||||
Cache::forget("user:filter:list:$pid");
|
Cache::forget("user:filter:list:$pid");
|
||||||
Cache::forget("feature:discover:posts:$pid");
|
Cache::forget("feature:discover:posts:$pid");
|
||||||
Cache::forget("api:local:exp:rec:$pid");
|
Cache::forget("api:local:exp:rec:$pid");
|
||||||
|
RelationshipService::refresh($pid, $id);
|
||||||
|
|
||||||
$resource = new Fractal\Resource\Item($account, new RelationshipTransformer());
|
$resource = new Fractal\Resource\Item($account, new RelationshipTransformer());
|
||||||
$res = $this->fractal->createData($resource)->toArray();
|
$res = $this->fractal->createData($resource)->toArray();
|
||||||
|
@ -1769,6 +1772,7 @@ class ApiV1Controller extends Controller
|
||||||
Cache::forget("user:filter:list:$pid");
|
Cache::forget("user:filter:list:$pid");
|
||||||
Cache::forget("feature:discover:posts:$pid");
|
Cache::forget("feature:discover:posts:$pid");
|
||||||
Cache::forget("api:local:exp:rec:$pid");
|
Cache::forget("api:local:exp:rec:$pid");
|
||||||
|
RelationshipService::refresh($pid, $id);
|
||||||
}
|
}
|
||||||
|
|
||||||
$resource = new Fractal\Resource\Item($account, new RelationshipTransformer());
|
$resource = new Fractal\Resource\Item($account, new RelationshipTransformer());
|
||||||
|
|
Loading…
Reference in New Issue