MCPcopy Create free account
hub / github.com/MOGANAKRISHNA-R/TrackingSkills / checkUser

Function checkUser

server/check_user.js:15–30  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13};
14
15const checkUser = async () => {
16 await connectDB();
17 const email = 'mikasa43@gmail.com';
18 // flexible find to ignore case
19 const user = await User.findOne({ email: { $regex: new RegExp(`^${email}$`, 'i') } });
20
21 if (user) {
22 console.log('--- USER DETAILS ---');
23 console.log(`Email: '${user.email}'`);
24 console.log(`Password: '${user.password}'`);
25 console.log('--------------------');
26 } else {
27 console.log('--- USER NOT FOUND ---');
28 }
29 process.exit();
30};
31
32checkUser();

Callers 1

check_user.jsFile · 0.85

Calls 1

connectDBFunction · 0.70

Tested by

no test coverage detected