Skip to content

Commit

Permalink
Fix: There was an issue fetching the favorite status of this dashboard
Browse files Browse the repository at this point in the history
…#6824 (#8013)

Issue: When Superset is running behind a reverse proxy and the dashboard page is requested with HTTPS protocol, the frontend can't retrieve the favorite status of the dashboard and, instead, displays the following toast message: 'There was an issue fetching the favorite status of this dashboard.'

Cause: While the API exposes the /favestar/Dashboard/{id}/count/ endpoint, the frontend executes an API call to /favestar/Dashboard/{id}/count, which leads to a redirect to an endpoint with HTTP protocol

Fix: Call the correct endpoint
  • Loading branch information
arthurpduarte authored and mistercrunch committed Aug 9, 2019
1 parent 6df2a71 commit 2ab8e15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion superset/assets/src/dashboard/actions/dashboardState.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const FETCH_FAVE_STAR = 'FETCH_FAVE_STAR';
export function fetchFaveStar(id) {
return function fetchFaveStarThunk(dispatch) {
return SupersetClient.get({
endpoint: `${FAVESTAR_BASE_URL}/${id}/count`,
endpoint: `${FAVESTAR_BASE_URL}/${id}/count/`,
})
.then(({ json }) => {
if (json.count > 0) dispatch(toggleFaveStar(true));
Expand Down

0 comments on commit 2ab8e15

Please sign in to comment.