Gps User Page

This commit is contained in:
Mr Swift
2024-08-23 15:47:53 +03:30
parent 4c5930ada0
commit b974644989
6 changed files with 223 additions and 6 deletions
+5 -2
View File
@@ -369,10 +369,13 @@ module.exports.getCurrent = async (req, res) => {
}
module.exports.getUsersForAdmin = async (req, res) => {
const user = await User.find({}).sort({ active: 1, created_at: -1 }).select('-password -token -otp -seenByAdmin')
const user = await User.find({}).sort({ active: 1, created_at: -1 }).select('-password -token -otp -seenByAdmin -cardBank')
res.status(200).json(user)
}
module.exports.getPendingUsersForAdmin = async (req, res) => {
const user = await User.find({active:false}).sort({ active: 1, created_at: -1 }).select('-password -token -otp -seenByAdmin -cardBank')
res.status(200).json(user)
}
module.exports.getUserForAdmin = async (req, res) => {
const user = await User.findById(req.params.id).select('-password -token -otp -seenByAdmin')
if (!user) {