mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-28 12:43:11 +10:00
Merge pull request #848 from sharetribe/fix-missing-profileImage-variants
Fix missing profile image variants
This commit is contained in:
commit
4a0db248cd
2 changed files with 19 additions and 2 deletions
|
|
@ -18,6 +18,9 @@ way to update this template, but currently, we follow a pattern:
|
|||
[#846](https://github.com/sharetribe/flex-template-web/pull/846)
|
||||
* [fix] Add missing styles for ModalMissingInformation from Topbar
|
||||
[#847](https://github.com/sharetribe/flex-template-web/pull/847)
|
||||
* [fix] API does not return all image variants anymore, this adds correct variants to update
|
||||
contact details call.
|
||||
[#848](https://github.com/sharetribe/flex-template-web/pull/848)
|
||||
|
||||
## v0.3.1
|
||||
|
||||
|
|
|
|||
|
|
@ -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