remove unneccessry projections in mongo

This commit is contained in:
StarAppeal
2025-09-18 22:35:46 +02:00
parent 6aac43311a
commit af68a1ed7e
+1 -2
View File
@@ -19,7 +19,6 @@ export class UserService {
public async updateUserById(id: string, user: Partial<IUser>): Promise<IUser | null> {
return await UserModel.findByIdAndUpdate(id, user, {
new: true,
projection: {password: 0},
}).exec();
}
@@ -82,7 +81,7 @@ export class UserService {
return await UserModel.findOneAndUpdate(
{ uuid },
{ $unset: { spotifyConfig: 1 } } as UpdateQuery<IUser>,
{ new: true, projection: { password: 0 } }
{ new: true }
).exec();
}