diff options
author | Vitaly Takmazov | 2024-02-14 10:51:09 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2024-02-18 18:08:07 +0300 |
commit | c9c500a07d58fbbbe8bfd1cbc326140872ccc785 (patch) | |
tree | f3a8428ca88093b484eb74beab4b91a17b6f6a1d /vnext/src/api | |
parent | fa1de59ff559e8537956786f1a70d6b67cbbfd86 (diff) |
Fetch ActivityPub profiles
Diffstat (limited to 'vnext/src/api')
-rw-r--r-- | vnext/src/api/index.js | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/vnext/src/api/index.js b/vnext/src/api/index.js index 7cb56c0e..095e18b8 100644 --- a/vnext/src/api/index.js +++ b/vnext/src/api/index.js @@ -71,8 +71,7 @@ const apiBaseUrl = 'https://beta.juick.com' const client = axios.create({ - baseURL: apiBaseUrl, - withCredentials: true + baseURL: apiBaseUrl }) /** @@ -225,10 +224,10 @@ export function fetchUserUri(profileUrl) { if (profileCache[profileUrl]) { resolve(profileCache[profileUrl]) } else { - client.get(profileUrl, { - headers: { - 'Accept': 'application/ld+json' - } + let data = new FormData() + data.append('uri', profileUrl) + client.post('/api/u/', data, { + withCredentials: false }).then(response => { profileCache[profileUrl] = response.data resolve(response.data) |