fix(S3): load attachement key was wrong
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user