fix(S3): load attachement key was wrong

This commit is contained in:
Josepablo C
2024-04-06 18:34:56 -06:00
parent e904c83cb5
commit 1a279aea87
2 changed files with 2 additions and 11 deletions

View File

@@ -68,16 +68,7 @@ async function findElements( companyId , query ){
}
async function findElementById( elementId , companyId ){
const filter = {
$and : [
{ _id : elementId },
{ $or :[
{ shipper : companyId },
{ carrier : companyId }
]}
]
};
let retVal = await Model.findOne( filter ).populate( populate_list ) || {};
let retVal = await Model.findById( elementId ).populate( populate_list ) || {};
return retVal;
}