diff --git a/src/apps/private/load-attachments/services.js b/src/apps/private/load-attachments/services.js index f7d4c3e..f74ef9d 100644 --- a/src/apps/private/load-attachments/services.js +++ b/src/apps/private/load-attachments/services.js @@ -12,7 +12,7 @@ const s3Client = new S3Client({ } }); const s3Bucket = apiConfig.S3.bucket; -const s3BucketKey = apiConfig.S3.key; +const s3BucketKey = apiConfig.S3.load_attachments_key; const Model = require( `${ROOT_PATH}/${MODELS_PATH}/load-attachments.model.js` ); const UserModel = require( `${ROOT_PATH}/${MODELS_PATH}/users.model.js` ); diff --git a/src/apps/private/vehicles/services.js b/src/apps/private/vehicles/services.js index be34640..9ae4c94 100644 --- a/src/apps/private/vehicles/services.js +++ b/src/apps/private/vehicles/services.js @@ -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; }