converted user.data.photo to user.photo

This commit is contained in:
Martina 2021-09-01 15:29:15 -07:00
parent e4e4f67293
commit c8b867bfa7
2 changed files with 4 additions and 8 deletions

View File

@ -13,9 +13,7 @@ export const sanitizeUser = (entity) => {
library: entity.library, //NOTE(martina): this is not in the database. It is added after
name: entity.name,
body: entity.body,
data: {
photo: entity.data?.photo,
},
photo: entity.photo,
followerCount: entity.followerCount,
slateCount: entity.slateCount,
};
@ -94,9 +92,9 @@ export const cleanUser = (entity) => {
data: entity.data,
body: entity.body,
onboarding: entity.onboarding,
photo: entity.photo,
apiToken: entity.apiToken,
// data: {
// photo: entity.data?.photo,
// tokens: entity.data?.tokens,
// settings: entity.data?.settings,
// status: entity.data?.status,
// },

View File

@ -71,9 +71,7 @@ export default class SceneEditAccount extends React.Component {
const cid = file.cid;
const url = Strings.getURLfromCID(cid);
let updateResponse = await Actions.updateViewer({
data: {
photo: Strings.getURLfromCID(cid),
},
photo: Strings.getURLfromCID(cid),
});
Events.hasError(updateResponse);