From 68dae08dec12b96ae020ce2213221debfab1d718 Mon Sep 17 00:00:00 2001
From: AkiraFukushima
Date: Thu, 19 Mar 2020 23:18:23 +0900
Subject: [PATCH] refs #816 Fix account profile API call
---
package-lock.json | 12 +++---
package.json | 2 +-
.../SideBar/AccountProfile/Follows.vue | 41 ++++++++++---------
.../Contents/SideBar/AccountProfile.ts | 4 +-
.../SideBar/AccountProfile/Followers.ts | 2 +-
.../SideBar/AccountProfile/Follows.ts | 2 +-
6 files changed, 32 insertions(+), 31 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 565213a3..09083c21 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -3788,9 +3788,9 @@
}
},
"@types/ws": {
- "version": "7.2.2",
- "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.2.2.tgz",
- "integrity": "sha512-oqnI3DbGCVI9zJ/WHdFo3CUE8jQ8CVQDUIKaDtlTcNeT4zs6UCg9Gvk5QrFx2QPkRszpM6yc8o0p4aGjCsTi+w==",
+ "version": "7.2.3",
+ "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.2.3.tgz",
+ "integrity": "sha512-VT/GK7nvDA7lfHy40G3LKM+ICqmdIsBLBHGXcWD97MtqQEjNMX+7Gudo8YGpaSlYdTX7IFThhCE8Jx09HegymQ==",
"requires": {
"@types/node": "*"
}
@@ -16593,9 +16593,9 @@
"dev": true
},
"megalodon": {
- "version": "3.0.0-rc.3",
- "resolved": "https://registry.npmjs.org/megalodon/-/megalodon-3.0.0-rc.3.tgz",
- "integrity": "sha512-EMXBBw/U0buIZzOBX0XhPvGJ8WTfo4I3Xxl5UQj3fGqUsdb3LJqCE232oo9zoAiktFP0JYbrEXgUkvG+w70R1w==",
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/megalodon/-/megalodon-3.0.0.tgz",
+ "integrity": "sha512-H0BwhizpOu0A0LOVJoy8jBKlFl1NiP+PNH2rZ8hMu5Z8qHt4Z9d3CrPX2cMX9j+c+rUhQzEdnWzu62SFcvzY3A==",
"requires": {
"@types/oauth": "^0.9.0",
"@types/ws": "^7.2.0",
diff --git a/package.json b/package.json
index 9717c802..66b97819 100644
--- a/package.json
+++ b/package.json
@@ -184,7 +184,7 @@
"hoek": "^6.1.3",
"i18next": "^19.0.3",
"lodash": "^4.17.15",
- "megalodon": "3.0.0-rc.3",
+ "megalodon": "3.0.0",
"moment": "^2.24.0",
"mousetrap": "^1.6.3",
"nedb": "^1.8.0",
diff --git a/src/renderer/components/TimelineSpace/Contents/SideBar/AccountProfile/Follows.vue b/src/renderer/components/TimelineSpace/Contents/SideBar/AccountProfile/Follows.vue
index 763e38ee..8a33150f 100644
--- a/src/renderer/components/TimelineSpace/Contents/SideBar/AccountProfile/Follows.vue
+++ b/src/renderer/components/TimelineSpace/Contents/SideBar/AccountProfile/Follows.vue
@@ -1,15 +1,16 @@
-
-
-
-
-
-
+
+
+
+
+
+
-
+
diff --git a/src/renderer/store/TimelineSpace/Contents/SideBar/AccountProfile.ts b/src/renderer/store/TimelineSpace/Contents/SideBar/AccountProfile.ts
index 9a3b86d1..484c3e72 100644
--- a/src/renderer/store/TimelineSpace/Contents/SideBar/AccountProfile.ts
+++ b/src/renderer/store/TimelineSpace/Contents/SideBar/AccountProfile.ts
@@ -114,8 +114,8 @@ const actions: ActionTree = {
rootState.App.userAgent,
rootState.App.proxyConfiguration
)
- const res = await client.getRelationship([account.id])
- commit(MUTATION_TYPES.CHANGE_RELATIONSHIP, res.data[0])
+ const res = await client.getRelationship(account.id)
+ commit(MUTATION_TYPES.CHANGE_RELATIONSHIP, res.data)
return res.data
},
reload: async ({ dispatch, state, commit }) => {
diff --git a/src/renderer/store/TimelineSpace/Contents/SideBar/AccountProfile/Followers.ts b/src/renderer/store/TimelineSpace/Contents/SideBar/AccountProfile/Followers.ts
index ea3a9061..bfcb476b 100644
--- a/src/renderer/store/TimelineSpace/Contents/SideBar/AccountProfile/Followers.ts
+++ b/src/renderer/store/TimelineSpace/Contents/SideBar/AccountProfile/Followers.ts
@@ -49,7 +49,7 @@ const actions: ActionTree = {
rootState.App.userAgent,
rootState.App.proxyConfiguration
)
- const res = await client.getRelationship(ids)
+ const res = await client.getRelationships(ids)
commit(MUTATION_TYPES.UPDATE_RELATIONSHIPS, res.data)
return res.data
}
diff --git a/src/renderer/store/TimelineSpace/Contents/SideBar/AccountProfile/Follows.ts b/src/renderer/store/TimelineSpace/Contents/SideBar/AccountProfile/Follows.ts
index 93e16c5e..10393bb5 100644
--- a/src/renderer/store/TimelineSpace/Contents/SideBar/AccountProfile/Follows.ts
+++ b/src/renderer/store/TimelineSpace/Contents/SideBar/AccountProfile/Follows.ts
@@ -48,7 +48,7 @@ const actions: ActionTree = {
rootState.App.userAgent,
rootState.App.proxyConfiguration
)
- const res = await client.getRelationship(ids)
+ const res = await client.getRelationships(ids)
commit(MUTATION_TYPES.UPDATE_RELATIONSHIPS, res.data)
return res.data
}