9
0
mirror of https://github.com/WiIIiam278/HuskSync.git synced 2026-01-06 15:41:56 +00:00

fix: MongoDB duplicate user table entries & not updating cached username (#301)

This commit is contained in:
Preva1l
2024-05-13 19:50:58 +10:00
committed by GitHub
parent 2b1e72a42e
commit 550ea26097

View File

@@ -113,7 +113,7 @@ public class MongoDbDatabase extends Database {
throw new MongoException("User document returned null!"); throw new MongoException("User document returned null!");
} }
Bson updates = Updates.set("uuid", user.getUuid().toString()); Bson updates = Updates.set("username", user.getUsername());
mongoCollectionHelper.updateDocument(usersTable, doc, updates); mongoCollectionHelper.updateDocument(usersTable, doc, updates);
} catch (MongoException e) { } catch (MongoException e) {
plugin.log(Level.SEVERE, "Failed to insert a user into the database", e); plugin.log(Level.SEVERE, "Failed to insert a user into the database", e);