fix sss
This commit is contained in:
parent
81bb4f133b
commit
700e096dd4
2 changed files with 16 additions and 1 deletions
|
|
@ -224,6 +224,9 @@ const updateProfile = ({ credentials, params }) => {
|
|||
formData.append(name + `[${i}][value]`, param.value)
|
||||
})
|
||||
} else {
|
||||
if (typeof params[name] === 'object') {
|
||||
console.warning('Object detected in updateProfile API call. This will not work, use updateProfileJSON instead.')
|
||||
}
|
||||
formData.append(name, params[name]);
|
||||
}
|
||||
}
|
||||
|
|
@ -237,6 +240,17 @@ const updateProfile = ({ credentials, params }) => {
|
|||
.then((data) => parseUser(data))
|
||||
}
|
||||
|
||||
const updateProfileJSON = ({ credentials, params }) => {
|
||||
return promisedRequest({
|
||||
url: MASTODON_PROFILE_UPDATE_URL,
|
||||
credentials,
|
||||
payload: params ,
|
||||
method: 'PATCH'
|
||||
})
|
||||
.then((data) => data.json())
|
||||
.then((data) => parseUser(data))
|
||||
}
|
||||
|
||||
// Params needed:
|
||||
// nickname
|
||||
// email
|
||||
|
|
@ -2060,6 +2074,7 @@ const apiService = {
|
|||
getCaptcha,
|
||||
updateProfileImages,
|
||||
updateProfile,
|
||||
updateProfileJSON,
|
||||
importMutes,
|
||||
importBlocks,
|
||||
importFollows,
|
||||
|
|
|
|||
|
|
@ -508,7 +508,7 @@ export const useServerSideStorageStore = defineStore('serverSideStorage', {
|
|||
this.updateCache({ username: window.vuex.state.users.currentUser.fqn })
|
||||
const params = { pleroma_settings_store: { 'pleroma-fe': this.cache } }
|
||||
window.vuex.state.api.backendInteractor
|
||||
.updateProfile({ params })
|
||||
.updateProfileJSON({ params })
|
||||
.then((user) => {
|
||||
this.setServerSideStorage(user)
|
||||
this.dirty = false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue