Fix: There was an issue fetching the favorite status of this dashboard #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
This commit is contained in:
Arthur P 2019-08-09 15:44:38 -07:00 committed by Maxime Beauchemin
parent 6df2a713e4
commit 2ab8e15ddf
1 changed files with 1 additions and 1 deletions

View File

@ -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));