forked from AkkomaGang/akkoma-fe
Merge branch 'fix/authenticated-remote-profile-fetching' into 'develop'
Send credentials when fetching remote profile. See merge request pleroma/pleroma-fe!125
This commit is contained in:
commit
e74e725750
2 changed files with 3 additions and 2 deletions
|
@ -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())
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue