fix
This commit is contained in:
parent
1ca0ffb1f0
commit
72f41d78ff
2 changed files with 4 additions and 4 deletions
|
|
@ -110,7 +110,7 @@ export const fetchUserByName = ({ name, credentials }) =>
|
||||||
credentials,
|
credentials,
|
||||||
params: { acct: name },
|
params: { acct: name },
|
||||||
})
|
})
|
||||||
.then((data) => data.id)
|
.then(({ data }) => data.id)
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
if (error && error.statusCode === 404) {
|
if (error && error.statusCode === 404) {
|
||||||
// Either the backend does not support lookup endpoint,
|
// Either the backend does not support lookup endpoint,
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ const fetchRelationship = (attempt, userId, store) =>
|
||||||
id: userId,
|
id: userId,
|
||||||
credentials: useOAuthStore().token,
|
credentials: useOAuthStore().token,
|
||||||
})
|
})
|
||||||
.then((relationship) => {
|
.then(({ data: relationship }) => {
|
||||||
store.commit('updateUserRelationship', [relationship])
|
store.commit('updateUserRelationship', [relationship])
|
||||||
return relationship
|
return relationship
|
||||||
})
|
})
|
||||||
|
|
@ -36,7 +36,7 @@ const fetchRelationship = (attempt, userId, store) =>
|
||||||
})
|
})
|
||||||
|
|
||||||
export const requestFollow = async (userId, store) => {
|
export const requestFollow = async (userId, store) => {
|
||||||
const updated = await followUser({
|
const { data: updated } = await followUser({
|
||||||
id: userId,
|
id: userId,
|
||||||
credentials: useOAuthStore().token,
|
credentials: useOAuthStore().token,
|
||||||
})
|
})
|
||||||
|
|
@ -58,7 +58,7 @@ export const requestFollow = async (userId, store) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const requestUnfollow = async (userId, store) => {
|
export const requestUnfollow = async (userId, store) => {
|
||||||
const updated = await unfollowUser({
|
const { data: updated } = await unfollowUser({
|
||||||
id: userId,
|
id: userId,
|
||||||
credentials: useOAuthStore().token,
|
credentials: useOAuthStore().token,
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue