diff options
| author | taehoon <th.dev91@gmail.com> | 2019-03-16 08:40:46 -0400 |
|---|---|---|
| committer | taehoon <th.dev91@gmail.com> | 2019-04-27 08:30:08 -0400 |
| commit | e14720419f743f630eec8a671833eb08923e3dee (patch) | |
| tree | becea9c237ed6636cd565e9ae0ab948d26d2e366 /src/components/user_settings/user_settings.js | |
| parent | 909d11825d83201bf9ff0ec9491e6361f511ca0f (diff) | |
Switch to mastoapi for updating user profile
Diffstat (limited to 'src/components/user_settings/user_settings.js')
| -rw-r--r-- | src/components/user_settings/user_settings.js | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/components/user_settings/user_settings.js b/src/components/user_settings/user_settings.js index bc824393..6b367e4f 100644 --- a/src/components/user_settings/user_settings.js +++ b/src/components/user_settings/user_settings.js @@ -110,11 +110,11 @@ const UserSettings = { }, methods: { updateProfile () { - const name = this.newName - const description = this.newBio + const note = this.newBio const locked = this.newLocked // Backend notation. /* eslint-disable camelcase */ + const display_name = this.newName const default_scope = this.newDefaultScope const no_rich_text = this.newNoRichText const hide_follows = this.hideFollows @@ -125,8 +125,8 @@ const UserSettings = { this.$store.state.api.backendInteractor .updateProfile({ params: { - name, - description, + display_name, + note, locked, // Backend notation. /* eslint-disable camelcase */ @@ -137,10 +137,8 @@ const UserSettings = { show_role /* eslint-enable camelcase */ }}).then((user) => { - if (!user.error) { - this.$store.commit('addNewUsers', [user]) - this.$store.commit('setCurrentUser', user) - } + this.$store.commit('addNewUsers', [user]) + this.$store.commit('setCurrentUser', user) }) }, changeVis (visibility) { |
