Add profile setup to onboarding in web UI (#27829)

This commit is contained in:
Eugen Rochko authored and GitHub committed 2023-11-15 11:13:53 +00:00
1 parent d8074128f9
commit d67bd44ca1
18 files changed
+524 -416

No files matched your search

@@ -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));
});
};