mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-26 00:03:16 +00:00
Update AdminController, update reports method
This commit is contained in:
parent
a70ab1ba36
commit
2ab73e1e96
1 changed files with 4 additions and 1 deletions
|
@ -67,7 +67,10 @@ class AdminController extends Controller
|
|||
public function reports(Request $request)
|
||||
{
|
||||
$filter = $request->input('filter') == 'closed' ? 'closed' : 'open';
|
||||
$reports = Report::orderBy('created_at','desc')
|
||||
$reports = Report::whereHas('status')
|
||||
->whereHas('reportedUser')
|
||||
->whereHas('reporter')
|
||||
->orderBy('created_at','desc')
|
||||
->when($filter, function($q, $filter) {
|
||||
return $filter == 'open' ?
|
||||
$q->whereNull('admin_seen') :
|
||||
|
|
Loading…
Reference in a new issue