diff options
-rw-r--r-- | vnext/src/api/index.js | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/vnext/src/api/index.js b/vnext/src/api/index.js index 8f452b82..f88695f2 100644 --- a/vnext/src/api/index.js +++ b/vnext/src/api/index.js @@ -96,7 +96,7 @@ export function me(username = '', password = '') { cookies.set('hash', visitor.hash, { path: '/' }); resolve(visitor); }).catch(reason => { - cookies.remove('hash', { path: '/'}); + cookies.remove('hash', { path: '/' }); reject(reason); }); }); @@ -214,12 +214,16 @@ export function markReadTracker(msg, visitor) { } /** - * @param {string} dataUri + * Fetch user profile + * + * @param {string} profileUrl User profile URL */ -export function fetchUserUri(dataUri) { +export function fetchUserUri(profileUrl) { return new Promise((resolve, reject) => { - let form = new FormData(); - form.append('uri', dataUri); - client.post('/u/', form).then(response => resolve(response)).catch(reject); + client.get(profileUrl, { + headers: { + 'Accept': 'application/ld+json' + } + }).then(response => resolve(response)).catch(reject); }); } |