mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-23 23:11:27 +00:00
commit
ddd9b7ef4e
3 changed files with 2 additions and 3 deletions
|
@ -685,7 +685,6 @@ class ApiV1Controller extends Controller
|
||||||
->whereNull('status')
|
->whereNull('status')
|
||||||
->findOrFail($id);
|
->findOrFail($id);
|
||||||
|
|
||||||
RelationshipService::refresh($user->profile_id, $target->id);
|
|
||||||
|
|
||||||
$private = (bool) $target->is_private;
|
$private = (bool) $target->is_private;
|
||||||
$remote = (bool) $target->domain;
|
$remote = (bool) $target->domain;
|
||||||
|
@ -718,6 +717,7 @@ class ApiV1Controller extends Controller
|
||||||
(new FollowerController())->sendUndoFollow($user->profile, $target);
|
(new FollowerController())->sendUndoFollow($user->profile, $target);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RelationshipService::refresh($user->profile_id, $target->id);
|
||||||
Cache::forget('profile:following:'.$target->id);
|
Cache::forget('profile:following:'.$target->id);
|
||||||
Cache::forget('profile:followers:'.$target->id);
|
Cache::forget('profile:followers:'.$target->id);
|
||||||
Cache::forget('profile:following:'.$user->profile_id);
|
Cache::forget('profile:following:'.$user->profile_id);
|
||||||
|
@ -726,8 +726,7 @@ class ApiV1Controller extends Controller
|
||||||
Cache::forget('user:account:id:'.$target->user_id);
|
Cache::forget('user:account:id:'.$target->user_id);
|
||||||
Cache::forget('user:account:id:'.$user->id);
|
Cache::forget('user:account:id:'.$user->id);
|
||||||
|
|
||||||
$resource = new Fractal\Resource\Item($target, new RelationshipTransformer());
|
$res = RelationshipService::get($user->profile_id, $target->id);
|
||||||
$res = $this->fractal->createData($resource)->toArray();
|
|
||||||
|
|
||||||
return response()->json($res);
|
return response()->json($res);
|
||||||
}
|
}
|
||||||
|
|
BIN
public/js/spa.js
vendored
BIN
public/js/spa.js
vendored
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue