Upsert user-prefs rows by userId primary key.
Prevent duplicate @pearcord/user-prefs documents on insert so partial writes can be repaired in place during startup recovery. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -116,6 +116,9 @@ class JsonStore {
|
||||
if (collection.includes('guild-boost-ledger')) {
|
||||
return { id: record.id }
|
||||
}
|
||||
if (collection.includes('user-prefs')) {
|
||||
return { userId: record.userId }
|
||||
}
|
||||
return { id: record.id }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user