Send credentials when fetching remote profile.
This commit is contained in:
parent
fb8b625d9a
commit
784eb8426c
|
@ -160,9 +160,10 @@ const authHeaders = (user) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const externalProfile = (profileUrl) => {
|
const externalProfile = ({profileUrl, credentials}) => {
|
||||||
let url = `${EXTERNAL_PROFILE_URL}?profileurl=${profileUrl}`
|
let url = `${EXTERNAL_PROFILE_URL}?profileurl=${profileUrl}`
|
||||||
return fetch(url, {
|
return fetch(url, {
|
||||||
|
headers: authHeaders(credentials),
|
||||||
method: 'GET'
|
method: 'GET'
|
||||||
}).then((data) => data.json())
|
}).then((data) => data.json())
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,7 @@ const backendInteractorService = (credentials) => {
|
||||||
const updateBanner = ({params}) => apiService.updateBanner({credentials, params})
|
const updateBanner = ({params}) => apiService.updateBanner({credentials, params})
|
||||||
const updateProfile = ({params}) => apiService.updateProfile({credentials, params})
|
const updateProfile = ({params}) => apiService.updateProfile({credentials, params})
|
||||||
|
|
||||||
const externalProfile = (profileUrl) => apiService.externalProfile(profileUrl)
|
const externalProfile = (profileUrl) => apiService.externalProfile({profileUrl, credentials})
|
||||||
|
|
||||||
const backendInteractorServiceInstance = {
|
const backendInteractorServiceInstance = {
|
||||||
fetchStatus,
|
fetchStatus,
|
||||||
|
|
Loading…
Reference in New Issue