Implement profile updates
This commit is contained in:
parent
fe52d19c48
commit
38ed9a7943
9 changed files with 24 additions and 33 deletions
|
@ -111,10 +111,7 @@ export class ProfileViewModel {
|
|||
}
|
||||
|
||||
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, fn)
|
||||
await apilib.updateProfile(this.rootStore, this.did, fn)
|
||||
await this.refresh()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue