Skip to content

Commit

Permalink
Fix userService errors
Browse files Browse the repository at this point in the history
  • Loading branch information
carolynzhang18 committed Sep 23, 2024
1 parent b3be2f5 commit 6ec96a5
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 18,782 deletions.
2 changes: 1 addition & 1 deletion backend/models/user.mgmodel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const UserSchema: Schema = new Schema(
);

/* eslint-disable no-param-reassign */
UserSchema.set("toJSON", {
UserSchema.set("toObject", {
virtuals: true,
versionKey: false,
transform: (_doc: Document, ret: Record<string, unknown>) => {
Expand Down
12 changes: 6 additions & 6 deletions backend/services/implementations/userService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class UserService implements IUserService {
}

return {
...user.toJSON(),
...user.toObject(),
email: firebaseUser.email ?? "",
};
}
Expand All @@ -65,7 +65,7 @@ class UserService implements IUserService {
}

return {
...user.toJSON(),
...user.toObject(),
email: firebaseUser.email ?? "",
};
}
Expand Down Expand Up @@ -125,7 +125,7 @@ class UserService implements IUserService {
}

return {
...user.toJSON(),
...user.toObject(),
email: firebaseUser.email ?? "",
};
}),
Expand Down Expand Up @@ -178,7 +178,7 @@ class UserService implements IUserService {
}

return {
...newUser.toJSON(),
...newUser.toObject(),
email: firebaseUser.email ?? "",
};
}
Expand Down Expand Up @@ -233,7 +233,7 @@ class UserService implements IUserService {
}

return {
...oldUser.toJSON(),
...oldUser.toObject(),
firstName: user.firstName,
lastName: user.lastName,
email: updatedFirebaseUser.email ?? "",
Expand Down Expand Up @@ -332,7 +332,7 @@ class UserService implements IUserService {
}

return {
...user.toJSON(),
...user.toObject(),
email: firebaseUser.email ?? "",
};
}),
Expand Down
Loading

0 comments on commit 6ec96a5

Please sign in to comment.