Merge branch 'hotfix/fix-profile-upload' into develop

This commit is contained in:
Ramon Wenger 2022-05-10 15:57:24 +02:00
commit d8f43a8af9
2 changed files with 9 additions and 4 deletions

View File

@ -3,7 +3,7 @@
<image-form <image-form
:value="value" :value="value"
index="0" index="0"
@link-change-url="changeLinkUrl" @change-url="changeLinkUrl"
/> />
</div> </div>
</template> </template>

View File

@ -64,9 +64,14 @@
}, },
update(store, {data: {updateAvatar: {success}}}) { update(store, {data: {updateAvatar: {success}}}) {
if (success) { if (success) {
const data = store.readQuery({query: ME_QUERY}); const {me} = store.readQuery({query: ME_QUERY});
if (data) { if (me) {
data.me.avatarUrl = url; const data = {
me: {
...me,
avatarUrl: url
}
};
store.writeQuery({query: ME_QUERY, data}); store.writeQuery({query: ME_QUERY, data});
} }
} }