aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlambda <pleromagit@rogerbraun.net>2017-11-06 22:37:00 +0000
committerlambda <pleromagit@rogerbraun.net>2017-11-06 22:37:00 +0000
commite74e7257508cb46dd0ef35685e5a4e2553f71619 (patch)
treedd6d240d67ad048bf161c5b8958123567a4bda12 /src
parent9fedcab9886e9b0df674f638de555f6520efcd2c (diff)
parent784eb8426c5c788504732f3482f8c5af65f06c27 (diff)
Merge branch 'fix/authenticated-remote-profile-fetching' into 'develop'
Send credentials when fetching remote profile. See merge request pleroma/pleroma-fe!125
Diffstat (limited to 'src')
-rw-r--r--src/services/api/api.service.js3
-rw-r--r--src/services/backend_interactor_service/backend_interactor_service.js2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js
index 28f8936b..a1c6b657 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 9a0910dd..a99ea38a 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,