aboutsummaryrefslogtreecommitdiff
path: root/src/server/authentication/DashUserModel.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-10-01 20:31:39 -0400
committerbobzel <zzzman@gmail.com>2020-10-01 20:31:39 -0400
commit266590937d3fda5dd96729edaa7c9bfac42370d9 (patch)
tree39a0315ff280757c8e07fd4e29a49a9d5e251efd /src/server/authentication/DashUserModel.ts
parentca64e0257cc4dd43e386c17b3d8b7b30747a7d9f (diff)
major performance fix by adding a SharingDocument to the user's DB account so that inquiring the users' UserDoc (and everything it referecens) is no longer necessary.
Diffstat (limited to 'src/server/authentication/DashUserModel.ts')
-rw-r--r--src/server/authentication/DashUserModel.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/server/authentication/DashUserModel.ts b/src/server/authentication/DashUserModel.ts
index 51d920a8f..0bdc25644 100644
--- a/src/server/authentication/DashUserModel.ts
+++ b/src/server/authentication/DashUserModel.ts
@@ -10,6 +10,7 @@ export type DashUserModel = mongoose.Document & {
passwordResetExpires?: Date,
userDocumentId: string;
+ sharingDocumentId: string;
profile: {
name: string,
@@ -35,7 +36,8 @@ const userSchema = new mongoose.Schema({
passwordResetToken: String,
passwordResetExpires: Date,
- userDocumentId: String,
+ userDocumentId: String, // id that identifies a document which hosts all of a user's account data
+ sharingDocumentId: String, // id that identifies a document that stores documents shared to a user, their user color, and any additional info needed to communicate between users
facebook: String,
twitter: String,