Add profile setup to onboarding in web UI (#27829)
This commit is contained in:
parent
d8074128f9
commit
d67bd44ca1
18 changed files with 524 additions and 416 deletions
|
@ -661,3 +661,18 @@ export function unpinAccountFail(error) {
|
|||
error,
|
||||
};
|
||||
}
|
||||
|
||||
export const updateAccount = ({ displayName, note, avatar, header, discoverable, indexable }) => (dispatch, getState) => {
|
||||
const data = new FormData();
|
||||
|
||||
data.append('display_name', displayName);
|
||||
data.append('note', note);
|
||||
if (avatar) data.append('avatar', avatar);
|
||||
if (header) data.append('header', header);
|
||||
data.append('discoverable', discoverable);
|
||||
data.append('indexable', indexable);
|
||||
|
||||
return api(getState).patch('/api/v1/accounts/update_credentials', data).then(response => {
|
||||
dispatch(importFetchedAccount(response.data));
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue