Skip to content

Commit 940f1c2

Browse files
committed
Fixed #15812 - regression in action_type search
Signed-off-by: snipe <[email protected]>
1 parent 3e131d5 commit 940f1c2

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

app/Http/Controllers/Api/ReportsController.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,22 @@ public function index(Request $request) : JsonResponse | array
4444
});
4545
}
4646

47+
if ($request->filled('action_type')) {
48+
$actionlogs = $actionlogs->where('action_type', '=', $request->input('action_type'))->orderBy('created_at', 'desc');
49+
}
50+
51+
if ($request->filled('created_by')) {
52+
$actionlogs = $actionlogs->where('created_by', '=', $request->input('created_by'));
53+
}
54+
55+
if ($request->filled('action_source')) {
56+
$actionlogs = $actionlogs->where('action_source', '=', $request->input('action_source'))->orderBy('created_at', 'desc');
57+
}
58+
59+
if ($request->filled('remote_ip')) {
60+
$actionlogs = $actionlogs->where('remote_ip', '=', $request->input('remote_ip'))->orderBy('created_at', 'desc');
61+
}
62+
4763

4864
if ($request->filled('uploads')) {
4965
$actionlogs = $actionlogs->whereNotNull('filename')->orderBy('created_at', 'desc');

0 commit comments

Comments
 (0)