Skip to content
Snippets Groups Projects
Commit c7eb7d51 authored by Lucas Eduardo Schoenfelder's avatar Lucas Eduardo Schoenfelder
Browse files

moved rename avatar attribute logic to Store

parent 42f97ffe
Branches
Tags
3 merge requests!57Merge of develop into master,!56Fixed buttons reportar, seguir, compartilhar, guardar and entrar (in comments...,!39Update admin system
......@@ -55,16 +55,7 @@ export default function LoginModal (props){
handleSnackbar(false);
}
function renameKeys (obj) {
if (obj.avatar_file_name) {
Object.defineProperty(obj, 'avatar',
Object.getOwnPropertyDescriptor(obj, 'avatar_file_name'));
delete obj['avatar_file_name'];
}
}
function handleSuccess (data) {
renameKeys(data.data)
dispatch ({
type: "USER_LOGGED_IN",
userLoggedIn: !state.userIsLoggedIn,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment