API & Client: Profile picture

This commit is contained in:
SamR1
2018-01-01 21:54:03 +01:00
parent 8e21fc4112
commit ddb765e02d
14 changed files with 293 additions and 8 deletions

View File

@ -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

View File

@ -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: '',
}
},
}