mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-26 06:47:17 +10:00
Image variants to included profileImage. (API has changed: returns defaults instead of all)
This commit is contained in:
parent
f4840ce1ea
commit
17cad7790f
1 changed files with 16 additions and 2 deletions
|
|
@ -79,7 +79,14 @@ const requestSavePhoneNumber = params => (dispatch, getState, sdk) => {
|
|||
const phoneNumber = params.phoneNumber;
|
||||
|
||||
return sdk.currentUser
|
||||
.updateProfile({ protectedData: { phoneNumber } }, { expand: true, include: ['profileImage'] })
|
||||
.updateProfile(
|
||||
{ protectedData: { phoneNumber } },
|
||||
{
|
||||
expand: true,
|
||||
include: ['profileImage'],
|
||||
'fields.image': ['variants.square-small', 'variants.square-small2x'],
|
||||
}
|
||||
)
|
||||
.then(response => {
|
||||
const entities = denormalisedResponseEntities(response);
|
||||
if (entities.length !== 1) {
|
||||
|
|
@ -104,7 +111,14 @@ const requestSaveEmail = params => (dispatch, getState, sdk) => {
|
|||
const { email, currentPassword } = params;
|
||||
|
||||
return sdk.currentUser
|
||||
.changeEmail({ email, currentPassword }, { expand: true, include: ['profileImage'] })
|
||||
.changeEmail(
|
||||
{ email, currentPassword },
|
||||
{
|
||||
expand: true,
|
||||
include: ['profileImage'],
|
||||
'fields.image': ['variants.square-small', 'variants.square-small2x'],
|
||||
}
|
||||
)
|
||||
.then(response => {
|
||||
const entities = denormalisedResponseEntities(response);
|
||||
if (entities.length !== 1) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue