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
No related branches found
No related tags found
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){ ...@@ -55,16 +55,7 @@ export default function LoginModal (props){
handleSnackbar(false); 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) { function handleSuccess (data) {
renameKeys(data.data)
dispatch ({ dispatch ({
type: "USER_LOGGED_IN", type: "USER_LOGGED_IN",
userLoggedIn: !state.userIsLoggedIn, userLoggedIn: !state.userIsLoggedIn,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment