making changes to user model to know what's optional and what's not to protect against google

This commit is contained in:
talksik
2022-05-05 04:45:08 -05:00
parent fbcd97ca89
commit 34e5a19276
3 changed files with 13 additions and 11 deletions
+4 -5
View File
@@ -93,18 +93,17 @@ async function login(req: Request, res: Response) {
);
// create initial user model object
const newUser = new User(
googleUserId,
userInfo.email,
userInfo.verifiedEmail,
userInfo.name,
userInfo.given_name,
userInfo.family_name,
userInfo.picture,
userInfo.locale,
new Date(),
UserStatus.ONLINE,
new Date()
userInfo.picture,
userInfo.verifiedEmail,
userInfo.locale
);
// create user if not exists