diff --git a/CHANGELOG.md b/CHANGELOG.md index e00cab2..a0c3ce0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # Changelog ## 3.3.0 - 2022-05-03 +### Fixed +- Don't crash on unauthenticated api call +### Changed - Add support for Nextcloud 24 ## 3.2.0 - 2021-12-09 diff --git a/lib/Controller/EpisodeActionController.php b/lib/Controller/EpisodeActionController.php index 2013324..f0cef9a 100644 --- a/lib/Controller/EpisodeActionController.php +++ b/lib/Controller/EpisodeActionController.php @@ -26,7 +26,7 @@ class EpisodeActionController extends Controller { ) { parent::__construct($AppName, $request); $this->episodeActionRepository = $episodeActionRepository; - $this->userId = $UserId; + $this->userId = $UserId !== null ? $UserId : ''; $this->episodeActionSaver = $episodeActionSaver; $this->request = $request; } diff --git a/lib/Controller/SubscriptionChangeController.php b/lib/Controller/SubscriptionChangeController.php index 1d533c4..d7c1cbd 100644 --- a/lib/Controller/SubscriptionChangeController.php +++ b/lib/Controller/SubscriptionChangeController.php @@ -28,7 +28,7 @@ class SubscriptionChangeController extends Controller { parent::__construct($AppName, $request); $this->subscriptionChangeSaver = $subscriptionChangeSaver; $this->subscriptionChangeRepository = $subscriptionChangeRepository; - $this->userId = $UserId; + $this->userId = $UserId !== null ? $UserId : ''; } /**