populates
This commit is contained in:
@@ -122,7 +122,7 @@ const getById = async (model, id, reply) => {
|
||||
try {
|
||||
var exec = model.findById(id);
|
||||
if ( model === Provision ) {
|
||||
exec = exec.populate('user').populate('destroy').populate({path:'_scenarioDoc', select: "-availableProductVersions -updated -created"});
|
||||
exec = exec.populate('user').populate('destroy').populate('_scenarioDoc');
|
||||
}
|
||||
if ( model === ApiKey ) {
|
||||
exec = exec.populate('user');
|
||||
@@ -141,7 +141,7 @@ const getOne = async (model, filter, reply) => {
|
||||
try {
|
||||
var exec = model.findOne(filter);
|
||||
if ( model === Provision ) {
|
||||
exec = exec.populate('user').populate('destroy').populate({path:'_scenarioDoc', select: "-availableProductVersions -updated -created"});
|
||||
exec = exec.populate('user').populate('destroy').populate('_scenarioDoc');
|
||||
}
|
||||
if ( model === ApiKey ) {
|
||||
exec = exec.populate('user');
|
||||
|
||||
Reference in New Issue
Block a user