Fix populate
This commit is contained in:
@@ -38,7 +38,7 @@ module.exports.getAllForUser = async (req, res) => {
|
||||
|
||||
module.exports.getAllForAdmin = async (req, res) => {
|
||||
|
||||
const requests = await Withdraw.find().sort({ status: 1 }).populate('userId')
|
||||
const requests = await Withdraw.find().sort({ status: 1 }).populate('userId', 'shopName shopNumber shopAddress birthDate score first_name last_name profilePic')
|
||||
|
||||
res.status(201).json(requests)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user