about summary refs log tree commit diff
path: root/src/state/models/profile-view.ts
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2022-10-03 11:17:12 -0500
committerPaul Frazee <pfrazee@gmail.com>2022-10-03 11:17:12 -0500
commit2058505bf12c0ddf145bd00182da96d0cf5e8f53 (patch)
treeb8012a04ab924d5147fa7f17f47c3b66ceeaa83b /src/state/models/profile-view.ts
parentc7d7e152a0e067a95b3d700147768d4244e464d1 (diff)
downloadvoidsky-2058505bf12c0ddf145bd00182da96d0cf5e8f53.tar.zst
Fix to auth of mutation ops
Diffstat (limited to 'src/state/models/profile-view.ts')
-rw-r--r--src/state/models/profile-view.ts8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/state/models/profile-view.ts b/src/state/models/profile-view.ts
index e7685482e..a7b8a7c7f 100644
--- a/src/state/models/profile-view.ts
+++ b/src/state/models/profile-view.ts
@@ -74,17 +74,13 @@ export class ProfileViewModel {
       throw new Error('Not logged in')
     }
     if (this.myState.follow) {
-      await apilib.unfollow(this.rootStore.api, this.myState.follow)
+      await apilib.unfollow(this.rootStore, this.myState.follow)
       runInAction(() => {
         this.followersCount--
         this.myState.follow = undefined
       })
     } else {
-      const res = await apilib.follow(
-        this.rootStore.api,
-        this.rootStore.me.did,
-        this.did,
-      )
+      const res = await apilib.follow(this.rootStore, this.did)
       runInAction(() => {
         this.followersCount++
         this.myState.follow = res.uri