about summary refs log tree commit diff
path: root/src/state/models
diff options
context:
space:
mode:
Diffstat (limited to 'src/state/models')
-rw-r--r--src/state/models/profile-view.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/state/models/profile-view.ts b/src/state/models/profile-view.ts
index a7b8a7c7f..aa0040d65 100644
--- a/src/state/models/profile-view.ts
+++ b/src/state/models/profile-view.ts
@@ -88,11 +88,11 @@ export class ProfileViewModel {
     }
   }
 
-  async updateProfile(profile: Profile.Record) {
+  async updateProfile(fn: (existing?: Profile.Record) => Profile.Record) {
     if (this.did !== this.rootStore.me.did) {
       throw new Error('Not your profile!')
     }
-    await apilib.updateProfile(this.rootStore.api, this.did, profile)
+    await apilib.updateProfile(this.rootStore, fn)
     await this.refresh()
   }