Merge pull request #3007 from danijelk/danijelk-patch-2

Always take "days of incidents to show" into account
This commit is contained in:
James Brooks
2018-04-23 22:22:33 +01:00
committed by GitHub

View File

@@ -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()