refs #816 Fix account profile API call
This commit is contained in:
parent
d662735729
commit
68dae08dec
|
@ -3788,9 +3788,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@types/ws": {
|
"@types/ws": {
|
||||||
"version": "7.2.2",
|
"version": "7.2.3",
|
||||||
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.2.2.tgz",
|
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.2.3.tgz",
|
||||||
"integrity": "sha512-oqnI3DbGCVI9zJ/WHdFo3CUE8jQ8CVQDUIKaDtlTcNeT4zs6UCg9Gvk5QrFx2QPkRszpM6yc8o0p4aGjCsTi+w==",
|
"integrity": "sha512-VT/GK7nvDA7lfHy40G3LKM+ICqmdIsBLBHGXcWD97MtqQEjNMX+7Gudo8YGpaSlYdTX7IFThhCE8Jx09HegymQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/node": "*"
|
"@types/node": "*"
|
||||||
}
|
}
|
||||||
|
@ -16593,9 +16593,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"megalodon": {
|
"megalodon": {
|
||||||
"version": "3.0.0-rc.3",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/megalodon/-/megalodon-3.0.0-rc.3.tgz",
|
"resolved": "https://registry.npmjs.org/megalodon/-/megalodon-3.0.0.tgz",
|
||||||
"integrity": "sha512-EMXBBw/U0buIZzOBX0XhPvGJ8WTfo4I3Xxl5UQj3fGqUsdb3LJqCE232oo9zoAiktFP0JYbrEXgUkvG+w70R1w==",
|
"integrity": "sha512-H0BwhizpOu0A0LOVJoy8jBKlFl1NiP+PNH2rZ8hMu5Z8qHt4Z9d3CrPX2cMX9j+c+rUhQzEdnWzu62SFcvzY3A==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/oauth": "^0.9.0",
|
"@types/oauth": "^0.9.0",
|
||||||
"@types/ws": "^7.2.0",
|
"@types/ws": "^7.2.0",
|
||||||
|
|
|
@ -184,7 +184,7 @@
|
||||||
"hoek": "^6.1.3",
|
"hoek": "^6.1.3",
|
||||||
"i18next": "^19.0.3",
|
"i18next": "^19.0.3",
|
||||||
"lodash": "^4.17.15",
|
"lodash": "^4.17.15",
|
||||||
"megalodon": "3.0.0-rc.3",
|
"megalodon": "3.0.0",
|
||||||
"moment": "^2.24.0",
|
"moment": "^2.24.0",
|
||||||
"mousetrap": "^1.6.3",
|
"mousetrap": "^1.6.3",
|
||||||
"nedb": "^1.8.0",
|
"nedb": "^1.8.0",
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<div id="follows">
|
<div id="follows">
|
||||||
<template v-for="follow in follows">
|
<template v-for="follow in follows">
|
||||||
<user :user="follow"
|
<user
|
||||||
|
:user="follow"
|
||||||
v-bind:key="follow.id"
|
v-bind:key="follow.id"
|
||||||
:relationship="targetRelation(follow.id)"
|
:relationship="targetRelation(follow.id)"
|
||||||
@followAccount="followAccount"
|
@followAccount="followAccount"
|
||||||
|
@ -41,6 +42,7 @@ export default {
|
||||||
const follows = await this.$store.dispatch('TimelineSpace/Contents/SideBar/AccountProfile/Follows/fetchFollows', this.account)
|
const follows = await this.$store.dispatch('TimelineSpace/Contents/SideBar/AccountProfile/Follows/fetchFollows', this.account)
|
||||||
await this.$store.dispatch('TimelineSpace/Contents/SideBar/AccountProfile/Follows/fetchRelationships', follows)
|
await this.$store.dispatch('TimelineSpace/Contents/SideBar/AccountProfile/Follows/fetchRelationships', follows)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
console.error(err)
|
||||||
this.$message({
|
this.$message({
|
||||||
message: this.$t('message.follows_fetch_error'),
|
message: this.$t('message.follows_fetch_error'),
|
||||||
type: 'error'
|
type: 'error'
|
||||||
|
@ -84,5 +86,4 @@ export default {
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped></style>
|
||||||
</style>
|
|
||||||
|
|
|
@ -114,8 +114,8 @@ const actions: ActionTree<AccountProfileState, RootState> = {
|
||||||
rootState.App.userAgent,
|
rootState.App.userAgent,
|
||||||
rootState.App.proxyConfiguration
|
rootState.App.proxyConfiguration
|
||||||
)
|
)
|
||||||
const res = await client.getRelationship([account.id])
|
const res = await client.getRelationship(account.id)
|
||||||
commit(MUTATION_TYPES.CHANGE_RELATIONSHIP, res.data[0])
|
commit(MUTATION_TYPES.CHANGE_RELATIONSHIP, res.data)
|
||||||
return res.data
|
return res.data
|
||||||
},
|
},
|
||||||
reload: async ({ dispatch, state, commit }) => {
|
reload: async ({ dispatch, state, commit }) => {
|
||||||
|
|
|
@ -49,7 +49,7 @@ const actions: ActionTree<FollowersState, RootState> = {
|
||||||
rootState.App.userAgent,
|
rootState.App.userAgent,
|
||||||
rootState.App.proxyConfiguration
|
rootState.App.proxyConfiguration
|
||||||
)
|
)
|
||||||
const res = await client.getRelationship(ids)
|
const res = await client.getRelationships(ids)
|
||||||
commit(MUTATION_TYPES.UPDATE_RELATIONSHIPS, res.data)
|
commit(MUTATION_TYPES.UPDATE_RELATIONSHIPS, res.data)
|
||||||
return res.data
|
return res.data
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,7 @@ const actions: ActionTree<FollowsState, RootState> = {
|
||||||
rootState.App.userAgent,
|
rootState.App.userAgent,
|
||||||
rootState.App.proxyConfiguration
|
rootState.App.proxyConfiguration
|
||||||
)
|
)
|
||||||
const res = await client.getRelationship(ids)
|
const res = await client.getRelationships(ids)
|
||||||
commit(MUTATION_TYPES.UPDATE_RELATIONSHIPS, res.data)
|
commit(MUTATION_TYPES.UPDATE_RELATIONSHIPS, res.data)
|
||||||
return res.data
|
return res.data
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue