Skip to content

Commit 4a29b87

Browse files
RahulGoyal-techbyt3quester
authored andcommitted
Removed id filtering for current data
1 parent a18b1bf commit 4a29b87

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

models/users.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,12 @@ const addOrUpdate = async (userData, userId = null) => {
4545
// user exists update user
4646
if (user.data()) {
4747
// remove id field if exist in fetched data or profileDiff
48-
const currentData = user.data();
49-
if ("id" in currentData) {
50-
delete currentData.id;
51-
}
5248
if ("id" in userData) {
5349
delete userData.id;
5450
}
5551
await userModel.doc(userId).set(
5652
{
57-
...currentData,
53+
...user.data(),
5854
...userData,
5955
updated_at: Date.now(),
6056
},

0 commit comments

Comments
 (0)