Skip to content

Commit 94e0079

Browse files
committed
2331: Fixed calendar api feed source config endpoint
1 parent f8e08a1 commit 94e0079

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ All notable changes to this project will be documented in this file.
55

66
## [Unreleased]
77

8+
- [#273](https://github.com/os2display/display-admin-client/pull/273)
9+
- Fixed calendar api feed source config endpoint.
810
- [#272](https://github.com/os2display/display-admin-client/pull/272)
911
- Fixed feed source selector.
1012
- [#264](https://github.com/os2display/display-admin-client/pull/264)

src/components/feed-sources/templates/calendar-api-feed-type.jsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@ const CalendarApiFeedType = ({
1919
useEffect(() => {
2020
if (feedSourceId && feedSourceId !== "") {
2121
ConfigLoader.loadConfig().then((config) => {
22-
setOptionsEndpoint(`${config.api + feedSourceId}/config/locations`);
22+
let endpoint = config.api;
23+
endpoint = endpoint.replace(/\/$/, "");
24+
endpoint += feedSourceId;
25+
endpoint += "/config/locations";
26+
27+
setOptionsEndpoint(endpoint);
2328
});
2429
}
2530
}, [feedSourceId]);

0 commit comments

Comments
 (0)