aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/Controller/UpcomingEventsController.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/lib/Controller/UpcomingEventsController.php')
-rw-r--r--apps/dav/lib/Controller/UpcomingEventsController.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/dav/lib/Controller/UpcomingEventsController.php b/apps/dav/lib/Controller/UpcomingEventsController.php
index c8eb39abb17..a5d54f44754 100644
--- a/apps/dav/lib/Controller/UpcomingEventsController.php
+++ b/apps/dav/lib/Controller/UpcomingEventsController.php
@@ -35,7 +35,7 @@ class UpcomingEventsController extends OCSController {
* Get information about upcoming events
*
* @param string|null $location location/URL to filter by
- * @return DataResponse<Http::STATUS_OK, array{events: DAVUpcomingEvent[]}, array{}>|DataResponse<Http::STATUS_UNAUTHORIZED, null, array{}>
+ * @return DataResponse<Http::STATUS_OK, array{events: list<DAVUpcomingEvent>}, array{}>|DataResponse<Http::STATUS_UNAUTHORIZED, null, array{}>
*
* 200: Upcoming events
* 401: When not authenticated
@@ -47,10 +47,10 @@ class UpcomingEventsController extends OCSController {
}
return new DataResponse([
- 'events' => array_map(fn (UpcomingEvent $e) => $e->jsonSerialize(), $this->service->getEvents(
+ 'events' => array_values(array_map(fn (UpcomingEvent $e) => $e->jsonSerialize(), $this->service->getEvents(
$this->userId,
$location,
- )),
+ ))),
]);
}