Get calendar events without passing a start and an end date

Created on 16 March 2023, over 1 year ago
Updated 17 April 2024, 7 months ago

Problem/Motivation

The calendar endpoint returns an error
DateTime::__construct(): Passing null to parameter #1 ($datetime) of type string is deprecated in. modules/contrib/bat_api/src/Plugin/ServiceDefinition/CalendarEventsIndex.php on line 142

Steps to reproduce

Go to /bat_api/calendar-events?_format=json&unit_types=all&unit_ids=&event_types=availability_daily&background=undefined

Proposed resolution

Check if the start and end dates have been provided for the request. If not set them to today.

API changes

The patch for this issue should work with the fix for the roomify/bat library

See https://github.com/Roomify/bat/pull/34

🐛 Bug report
Status

Closed: won't fix

Version

1.1

Component

Code

Created by

🇬🇧United Kingdom Alina Basarabeanu

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024