diff --git a/CHANGELOG.md b/CHANGELOG.md index 59face0b8..914f338f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +- [#273](https://github.com/os2display/display-admin-client/pull/273) + - Fixed calendar api feed source config endpoint. - [#272](https://github.com/os2display/display-admin-client/pull/272) - Fixed feed source selector. - [#264](https://github.com/os2display/display-admin-client/pull/264) diff --git a/src/components/feed-sources/templates/calendar-api-feed-type.jsx b/src/components/feed-sources/templates/calendar-api-feed-type.jsx index 733cac5fe..b6e5ac0b5 100644 --- a/src/components/feed-sources/templates/calendar-api-feed-type.jsx +++ b/src/components/feed-sources/templates/calendar-api-feed-type.jsx @@ -19,7 +19,12 @@ const CalendarApiFeedType = ({ useEffect(() => { if (feedSourceId && feedSourceId !== "") { ConfigLoader.loadConfig().then((config) => { - setOptionsEndpoint(`${config.api + feedSourceId}/config/locations`); + let endpoint = config.api; + endpoint = endpoint.replace(/\/$/, ""); + endpoint += feedSourceId; + endpoint += "/config/locations"; + + setOptionsEndpoint(endpoint); }); } }, [feedSourceId]);