diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js index 28f8936b5f..a1c6b65764 100644 --- a/src/services/api/api.service.js +++ b/src/services/api/api.service.js @@ -160,9 +160,10 @@ const authHeaders = (user) => { } } -const externalProfile = (profileUrl) => { +const externalProfile = ({profileUrl, credentials}) => { let url = `${EXTERNAL_PROFILE_URL}?profileurl=${profileUrl}` return fetch(url, { + headers: authHeaders(credentials), method: 'GET' }).then((data) => data.json()) } diff --git a/src/services/backend_interactor_service/backend_interactor_service.js b/src/services/backend_interactor_service/backend_interactor_service.js index 9a0910ddf8..a99ea38ab7 100644 --- a/src/services/backend_interactor_service/backend_interactor_service.js +++ b/src/services/backend_interactor_service/backend_interactor_service.js @@ -46,7 +46,7 @@ const backendInteractorService = (credentials) => { const updateBanner = ({params}) => apiService.updateBanner({credentials, params}) const updateProfile = ({params}) => apiService.updateProfile({credentials, params}) - const externalProfile = (profileUrl) => apiService.externalProfile(profileUrl) + const externalProfile = (profileUrl) => apiService.externalProfile({profileUrl, credentials}) const backendInteractorServiceInstance = { fetchStatus,