mirror of
https://github.com/CachetHQ/Cachet.git
synced 2025-01-17 05:28:18 +01:00
Always take "days of incidents to show" into account
No need to select everything when looking at past incidents, date range should always be taken into account as a global rule for frontend.
This commit is contained in:
parent
3c51e5115a
commit
4f0a28f8a9
@ -67,6 +67,10 @@ class StatusPageController extends AbstractApiController
|
||||
|
||||
$allIncidentDays = Incident::where('visible', '>=', (int) !Auth::check())
|
||||
->select('occurred_at')
|
||||
->whereBetween('occurred_at', [
|
||||
$endDate->format('Y-m-d').' 00:00:00',
|
||||
$startDate->format('Y-m-d').' 23:59:59',
|
||||
])
|
||||
->distinct()
|
||||
->orderBy('occurred_at', 'desc')
|
||||
->get()
|
||||
|
Loading…
x
Reference in New Issue
Block a user