diff --git a/server/controllers/GPS.BankAccount.js b/server/controllers/GPS.BankAccount.js index 9881a88..8331c0a 100644 --- a/server/controllers/GPS.BankAccount.js +++ b/server/controllers/GPS.BankAccount.js @@ -1,6 +1,6 @@ const { body, param, validationResult } = require('express-validator') const { _sr } = require('../plugins/serverResponses') -const { checkValidations, res400 } = require('../plugins/controllersHelperFunctions') +const { checkValidations } = require('../plugins/controllersHelperFunctions') const User = require('../models/User') module.exports.addCard = [ diff --git a/server/controllers/GPS.Request.js b/server/controllers/GPS.Request.js index d225a63..74b23e5 100644 --- a/server/controllers/GPS.Request.js +++ b/server/controllers/GPS.Request.js @@ -35,7 +35,7 @@ module.exports.gpsRequest = [ module.exports.getAllRequest = [ async (req, res) => { - const data = await RequestGPS.find({}).sort({ status: 1 }) + const data = await RequestGPS.find({}).sort({ status: 1 }).populate('userId') res.status(200).json(data) } ] diff --git a/server/controllers/GPS.Withdraw.js b/server/controllers/GPS.Withdraw.js index fd35696..cc99544 100644 --- a/server/controllers/GPS.Withdraw.js +++ b/server/controllers/GPS.Withdraw.js @@ -38,7 +38,7 @@ module.exports.getAllForUser = async (req, res) => { module.exports.getAllForAdmin = async (req, res) => { - const requests = await Withdraw.find().sort({ status: 1 }) + const requests = await Withdraw.find().sort({ status: 1 }).populate('userId') res.status(201).json(requests) }