This commit is contained in:
Henry Jameson 2026-06-17 18:15:41 +03:00
commit 72f41d78ff
2 changed files with 4 additions and 4 deletions

View file

@ -110,7 +110,7 @@ export const fetchUserByName = ({ name, credentials }) =>
credentials,
params: { acct: name },
})
.then((data) => data.id)
.then(({ data }) => data.id)
.catch((error) => {
if (error && error.statusCode === 404) {
// Either the backend does not support lookup endpoint,

View file

@ -13,7 +13,7 @@ const fetchRelationship = (attempt, userId, store) =>
id: userId,
credentials: useOAuthStore().token,
})
.then((relationship) => {
.then(({ data: relationship }) => {
store.commit('updateUserRelationship', [relationship])
return relationship
})
@ -36,7 +36,7 @@ const fetchRelationship = (attempt, userId, store) =>
})
export const requestFollow = async (userId, store) => {
const updated = await followUser({
const { data: updated } = await followUser({
id: userId,
credentials: useOAuthStore().token,
})
@ -58,7 +58,7 @@ export const requestFollow = async (userId, store) => {
}
export const requestUnfollow = async (userId, store) => {
const updated = await unfollowUser({
const { data: updated } = await unfollowUser({
id: userId,
credentials: useOAuthStore().token,
})