Skip to content

Commit 432befd

Browse files
committed
fixup broken profile update; prepare for calling UpdateUser instead of partial updates
1 parent e0a4e11 commit 432befd

File tree

2 files changed

+1
-17
lines changed

2 files changed

+1
-17
lines changed

components/dashboard/src/user-settings/Account.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ export default function Account() {
5757
}
5858

5959
await updateUser.mutateAsync({
60+
fullName: profileState.name,
6061
additionalData: {
6162
profile: profileState,
6263
},

components/gitpod-protocol/src/protocol.ts

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -194,23 +194,6 @@ export namespace User {
194194
};
195195
}
196196

197-
export function setProfile(user: User, profile: Profile): User {
198-
user.fullName = profile.name;
199-
user.avatarUrl = profile.avatarURL;
200-
201-
if (!user.additionalData) {
202-
user.additionalData = {};
203-
}
204-
if (!user.additionalData.profile) {
205-
user.additionalData.profile = {};
206-
}
207-
user.additionalData.profile.emailAddress = profile.email;
208-
user.additionalData.profile.companyName = profile.company;
209-
user.additionalData.profile.lastUpdatedDetailsNudge = new Date().toISOString();
210-
211-
return user;
212-
}
213-
214197
// TODO: refactor where this is referenced so it's more clearly tied to just analytics-tracking
215198
// Let other places rely on the ProfileDetails type since that's what we store
216199
// This is the profile data we send to our Segment analytics tracking pipeline

0 commit comments

Comments
 (0)