Skip to content

Commit

Permalink
Fixed #14495 - Allow user_id to be passed to limit to only specific a…
Browse files Browse the repository at this point in the history
…dmins

Signed-off-by: snipe <snipe@snipe.net>
  • Loading branch information
snipe committed Mar 26, 2024
1 parent f450caf commit 3ced850
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/Http/Controllers/Api/ReportsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ public function index(Request $request)
$actionlogs = $actionlogs->where('action_type', '=', $request->input('action_type'))->orderBy('created_at', 'desc');
}

if ($request->filled('user_id')) {
$actionlogs = $actionlogs->where('user_id', '=', $request->input('user_id'));
}

if ($request->filled('action_source')) {
$actionlogs = $actionlogs->where('action_source', '=', $request->input('action_source'))->orderBy('created_at', 'desc');
}
Expand Down

0 comments on commit 3ced850

Please sign in to comment.