Skip to content

Commit 34cfedc

Browse files
BackendExpertJehanKandyAnupa1998
committed
Update UserController.js
Co-Authored-By: JehanKandy <jehankandy@gmail.com> Co-Authored-By: Anupa Gamage <125038143+Anupa1998@users.noreply.github.com>
1 parent 12ec6a3 commit 34cfedc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

server/Controllers/UserController.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@ const User = require('../Models/User')
22

33
const UserController = {
44
CountUsers: async(req, res) => {
5-
5+
try{
6+
const UserCount = await User.countDocuments()
7+
}
8+
catch (err) {
9+
console.log(err)
10+
}
611
}
712
}
813

0 commit comments

Comments
 (0)