summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/controllers/users.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/controllers/users.js b/server/controllers/users.js
index ea1a4e3..d986028 100644
--- a/server/controllers/users.js
+++ b/server/controllers/users.js
@@ -16,7 +16,7 @@ const createUser = async (req, res) => {
} = req.body;
try {
- const existingUser = await UserDetails.findOne({name, mobile, email});
+ const existingUser = await UserDetails.findOne({name, mobile, dob});
if (existingUser) {
return res.status(400).json({message: 'User already exists.'});
}