API & Client: Profile picture
This commit is contained in:
@ -50,6 +50,7 @@ const message = (state = initial.message, action) => {
|
||||
case 'AUTH_ERROR':
|
||||
case 'PROFILE_ERROR':
|
||||
case 'PWD_ERROR':
|
||||
case 'PICTURE_ERROR':
|
||||
return action.message
|
||||
case 'LOGOUT':
|
||||
case 'PROFILE_SUCCESS':
|
||||
@ -103,6 +104,9 @@ const user = (state = initial.user, action) => {
|
||||
birthDate: action.message.data.birth_date
|
||||
? action.message.data.birth_date
|
||||
: '',
|
||||
picture: action.message.data.picture === true
|
||||
? action.message.data.picture
|
||||
: false,
|
||||
}
|
||||
default:
|
||||
return state
|
||||
|
@ -12,7 +12,8 @@ export default {
|
||||
lastName: '',
|
||||
bio: '',
|
||||
location: '',
|
||||
birthDate: ''
|
||||
birthDate: '',
|
||||
picture: false
|
||||
},
|
||||
formData: {
|
||||
formData: {
|
||||
@ -30,7 +31,7 @@ export default {
|
||||
location: '',
|
||||
birthDate: '',
|
||||
password: '',
|
||||
passwordConf: ''
|
||||
passwordConf: '',
|
||||
}
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user