aboutsummaryrefslogtreecommitdiff
path: root/src/server/authentication
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/authentication')
-rw-r--r--src/server/authentication/AuthenticationManager.ts3
-rw-r--r--src/server/authentication/DashUserModel.ts4
2 files changed, 5 insertions, 2 deletions
diff --git a/src/server/authentication/AuthenticationManager.ts b/src/server/authentication/AuthenticationManager.ts
index 00f1fe44e..36363e3cf 100644
--- a/src/server/authentication/AuthenticationManager.ts
+++ b/src/server/authentication/AuthenticationManager.ts
@@ -47,7 +47,8 @@ export let postSignup = (req: Request, res: Response, next: NextFunction) => {
const model = {
email,
password,
- userDocumentId: Utils.GenerateGuid()
+ userDocumentId: Utils.GenerateGuid(),
+ sharingDocumentId: Utils.GenerateGuid()
} as Partial<DashUserModel>;
const user = new User(model);
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,