|
|
|
@ -1152,7 +1152,7 @@ exports.getFavoriteSuppliers = async (req, reply) => {
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
const user = await User.findOne({ customerId })
|
|
|
|
const user = await User.findOne({ customerId })
|
|
|
|
.populate("favorate_suppliers") // If you want to get full supplier details
|
|
|
|
.populate("favorate_suppliers") // This will now work properly
|
|
|
|
.exec();
|
|
|
|
.exec();
|
|
|
|
|
|
|
|
|
|
|
|
if (!user) {
|
|
|
|
if (!user) {
|
|
|
|
|