Gps User Page
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user