fix/better update player fields to avoid mongo error

This commit is contained in:
SowinskiBraeden committed 2024-04-25 10:55:51 -07:00
1 parent 7d8096b3d6
commit 3b8d28e536
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -28,7 +28,7 @@ module.exports = {
return new Promise(resolve => {
client.dbo.collection("players").updateOne(
{ "playerID": player.playerID },
{ $set: player },
{ $set: {...player} },
{ upsert: true }, // Create player stat document if it does not exist
(err, _) => {
if (err) {