mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-27 00:33:17 +00:00
Update AccountController
This commit is contained in:
parent
fa99ab79c3
commit
c40b4f5cfd
1 changed files with 2 additions and 6 deletions
|
@ -205,12 +205,10 @@ class AccountController extends Controller
|
||||||
|
|
||||||
$pid = $user->id;
|
$pid = $user->id;
|
||||||
Cache::remember("user:filter:list:$pid", 1440, function() use($pid) {
|
Cache::remember("user:filter:list:$pid", 1440, function() use($pid) {
|
||||||
$private = Profile::whereIsPrivate(true)->where('id', '!=', $pid)->pluck('id');
|
return UserFilter::whereUserId($pid)
|
||||||
$filters = UserFilter::whereUserId($pid)
|
|
||||||
->whereFilterableType('App\Profile')
|
->whereFilterableType('App\Profile')
|
||||||
->whereIn('filter_type', ['mute', 'block'])
|
->whereIn('filter_type', ['mute', 'block'])
|
||||||
->pluck('filterable_id')->toArray();
|
->pluck('filterable_id')->toArray();
|
||||||
return array_merge($private->toArray(), $filters);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return redirect()->back();
|
return redirect()->back();
|
||||||
|
@ -259,12 +257,10 @@ class AccountController extends Controller
|
||||||
|
|
||||||
$pid = $user->id;
|
$pid = $user->id;
|
||||||
Cache::remember("user:filter:list:$pid", 1440, function() use($pid) {
|
Cache::remember("user:filter:list:$pid", 1440, function() use($pid) {
|
||||||
$private = Profile::whereIsPrivate(true)->where('id', '!=', $pid)->pluck('id');
|
return UserFilter::whereUserId($pid)
|
||||||
$filters = UserFilter::whereUserId($pid)
|
|
||||||
->whereFilterableType('App\Profile')
|
->whereFilterableType('App\Profile')
|
||||||
->whereIn('filter_type', ['mute', 'block'])
|
->whereIn('filter_type', ['mute', 'block'])
|
||||||
->pluck('filterable_id')->toArray();
|
->pluck('filterable_id')->toArray();
|
||||||
return array_merge($private->toArray(), $filters);
|
|
||||||
});
|
});
|
||||||
return redirect()->back();
|
return redirect()->back();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue