fix: Add load.categories to the populate of proposals
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
"use strict";
|
||||
|
||||
const { populate } = require("dotenv");
|
||||
|
||||
const { ROOT_PATH, LIB_PATH, MODELS_PATH, HANDLERS_PATH } = process.env;
|
||||
const { getModel } = require( `${ROOT_PATH}/${MODELS_PATH}` );
|
||||
const { getPagination } = require( `${ROOT_PATH}/${LIB_PATH}/Misc.js` );
|
||||
const { GenericHandler } = require( `${ROOT_PATH}/${HANDLERS_PATH}/Generic.handler.js` );
|
||||
const Model = getModel('proposals');
|
||||
|
||||
const populate_list = ['load', 'shipper','carrier','vehicle','bidder','accepted_by'];
|
||||
const populate_list = [{ path:'load' , populate : { path : 'categories' } }, 'shipper','carrier','vehicle','bidder','accepted_by'];
|
||||
const generic = new GenericHandler( Model, null, populate_list );
|
||||
|
||||
function getAndFilterList( query ){
|
||||
|
||||
Reference in New Issue
Block a user