Skip to content

Commit

Permalink
Merge pull request #273 from os2display/feature/calendar-feed-fixed-c…
Browse files Browse the repository at this point in the history
…onfig-endpoint

Fixed calendar api feed source config endpoint
  • Loading branch information
tuj authored Dec 3, 2024
2 parents f8e08a1 + 94e0079 commit c01afab
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down

0 comments on commit c01afab

Please sign in to comment.